Diagram
A decision tree that starts with a workload and branches on trigger type, statefulness, and control needs to recommend Cloud Run functions, Cloud Run, or GKE, with pricing and scaling notes on each leaf.
Choosing Between the Three Archetypes
Choosing between the three archetypes depends on trigger type, state, and control needs. Both Cloud Run and GKE use standard container images, so the same image stored in Artifact Registry can run on either platform without modification. Both also integrate with Cloud Logging, Cloud Monitoring, Cloud Deploy, and Binary Authorization, which enables a hybrid design with a stateless frontend on Cloud Run and a stateful service on GKE.
| Option | Trigger and scaling signal | Best-fit workload |
|---|---|---|
| Cloud Run functions | Cloud event starts a lightweight function, which starts downstream work | Event-driven tasks, such as starting a Cloud Run job when data arrives |
| Cloud Run | Incoming HTTP requests or CPU use adds or removes instances automatically | Stateless web services, APIs, and batch jobs with spiky traffic |
| Google Kubernetes Engine (GKE) | Pod autoscalers adjust containers and cluster autoscaler adjusts nodes | Stateful services and complex microservices needing custom nodes, storage, or networking |
Domain 6 of 7
23 practice questions
Practice this DomainLast updated