Prepare and test your skills

Prepare and test your skills

Determining appropriate compute options for common workload scenarios means matching application architecture, deployment frequency, and scaling behavior to the most aligned Google Cloud service. The main choice is between Cloud Run (opens in a new tab), Google Kubernetes Engine (GKE), and Compute Engine (opens in a new tab). More control over infrastructure gives more flexibility but increases maintenance work, while more automation by Google reduces maintenance but limits customization.
The control versus management trade-off is the starting point for choosing compute in Google Cloud. The decision flow moves in order from fully managed serverless options to self-managed infrastructure. Answering the questions in order points to the option that fits operations needs:
This ordered flow ensures that highly automated options are considered first, and self-managed options are chosen only when customization requires them.
Cloud Run is a serverless platform for running containerized web applications and jobs without managing servers or clusters. You package the workload as a container deployed as a web service, asynchronous task, or batch job, and Google handles the operating system, kernel, network setup, and capacity management. Cloud Run is a strong fit for workloads that deploy frequently and need to scale quickly with traffic.
Cloud Run scales container instances automatically without manual intervention:
Because scaling follows traffic, Cloud Run works well for variable workloads that can scale to zero when idle and scale out during spikes.
Google Kubernetes Engine (GKE) is a managed Kubernetes platform for deploying, scaling, and orchestrating containerized applications. Google manages the Kubernetes control plane for security and system availability, while containers run across cluster nodes. GKE is the right choice for distributed applications and general-purpose microservices that need robust container orchestration.
GKE divides node management into two modes and scales at both the container and node layers:
This layered scaling lets frequent deployments roll out across many microservices while the platform adjusts containers first and then adds nodes only when capacity requires it.
Compute Engine is Google Cloud's core Infrastructure as a Service (IaaS) platform for creating and running virtual machine (VM) and bare metal instances. Compute Engine runs instances on Google's physical hardware and gives you complete control over CPU, memory, storage, guest operating system, kernel settings, and boot files. Choose Compute Engine when applications need custom architectural configurations, specialized kernel settings, or administrative control over virtual servers.
Compute Engine leaves orchestration and scaling to you, with optional automation through groups:
Because you control the full stack, Compute Engine fits lift-and-shift workloads, stateful systems, and software that requires a specific operating system or long-running servers.
Matching architecture, deployment, and scaling to the right option means using those three factors together to decide between automation and control. Containerized web apps and APIs with frequent releases favor automation, while custom VM-based systems favor control. Steady scaling can be planned on VMs, while spiky or request-driven scaling favors serverless or Kubernetes autoscaling.
| Service | Infrastructure control | Scaling behavior | Choose when |
|---|---|---|---|
| Cloud Run | Google manages OS, kernel, network, and capacity | Adds or removes container instances based on requests or CPU | Architecture is containerized web services or jobs with frequent deploys and variable traffic |
| Google Kubernetes Engine (GKE) | Google manages control plane and OS; you manage workloads and, in Standard mode, node pools | Adds or removes containers with HPA and VPA, and nodes with cluster autoscaler | Architecture is distributed microservices needing container orchestration and coordinated scaling |
| Compute Engine | You control OS, kernel, machine type, storage, and network | Manual scaling or MIGs that you configure | Architecture needs custom VMs, bare metal, or specialized OS and kernel control |
Exam tip: Choose Cloud Run when you want Google to manage all infrastructure, choose GKE for standard containerized microservices or APIs, and choose Compute Engine when you want to manage VMs yourself.
Assessing core attributes of GCP compute models means comparing how serverless, container-based, and virtual machine models differ in provisioning, scalability, and management responsibility. The three broad models are serverless, container-based, and virtual machine compute. Choosing among them affects performance, cost, and daily maintenance effort.
The decision flow for choosing compute asks five questions in order to balance control and managed service. The flow starts with full infrastructure management and narrows toward VMs, batch jobs, or specialized clusters. Following the order prevents choosing a complex self-managed option when a managed option would fit:
A decision tree asking five ordered questions about infrastructure management, orchestration, and VM control to route a workload to Cloud Run, Compute Engine, Batch, GKE, Cluster Director, or Cluster Toolkit, moving from most managed to most self-managed options.
Each answer moves the workload toward either more automation by Google or more control by you.
A comparison of GCP compute models shows how serverless, container-based, and virtual machine options differ in provisioning, scaling, management responsibility, and workload patterns. Serverless minimizes administration, containers add orchestration control, and virtual machines give full infrastructure control. The table summarizes the trade-off:
| Model | Examples | Provisioning | Scaling | Management responsibility | Workload patterns |
|---|---|---|---|---|---|
| Serverless | Cloud Run, Batch | Deploy containers or scripts; Google handles OS, kernel, network, and capacity | Cloud Run adds or removes instances based on requests or CPU; Batch provisions and stops VMs based on queued jobs | Google manages infrastructure; minimal administration | Web apps, async tasks, batch jobs, data analysis, video conversion, simulations |
| Container-based | GKE | Managed Kubernetes; Google manages control plane; Autopilot manages nodes, Standard you manage node pools | HPA and VPA adjust containers; cluster autoscaler adjusts nodes; Kueue orchestrates batch jobs | Google manages control plane; you manage workloads; Autopilot reduces node management | Distributed apps, microservices, APIs, containerized apps |
| Virtual machine | Compute Engine, VMware Engine | Create VMs or bare metal; choose machine types, OS, storage; VMware Engine runs VMware VMs | Compute Engine: manual add or remove, custom tools, or MIGs; VMware Engine: minimal operational changes | You control OS, kernel, boot files; manage network, backups, reliability; VMware Engine minimizes operational changes | Custom architectures, specialized kernels, commercial off-the-shelf, migrations, VMware workloads |
The pattern is consistent: as you move from serverless to virtual machines, provisioning control increases and Google's management responsibility decreases.
Serverless compute on Google Cloud is a model where Google manages the infrastructure so you can run workloads without server or cluster administration. Cloud Run (opens in a new tab) is a serverless platform for containerized web applications and jobs. Google handles all infrastructure management, including the operating system, kernel, network setup, and capacity management. For web services, Cloud Run adds or removes container instances based on incoming requests or CPU consumption. Cloud Run supports NVIDIA RTX PRO 6000 Blackwell and L4 GPUs, but it does not support other GPU models or Google TPUs.
Batch is a serverless option for scheduling, queuing, and executing batch compute jobs. You submit executable scripts or containerized workloads to a job queue, and Google manages the operating system and execution environment. The job queue schedules tasks and retries them if an error occurs. To scale capacity, Batch provisions and starts VMs based on the number of queued jobs, then stops the VMs when those jobs complete. Batch supports NVIDIA GPUs up to RTX PRO 6000 for batch and high performance computing (HPC) workloads, but it does not support Google TPUs. Use Batch for asynchronous data analysis, video conversion tasks, or scientific simulations.
Container-based compute on Google Cloud uses a managed orchestration platform to deploy, scale, and manage containerized applications. Google Kubernetes Engine (GKE) is an industry-standard managed Kubernetes platform. Google manages the Kubernetes control plane for security and system availability. In Autopilot mode, Google manages cluster nodes and capacity adjustments without manual intervention. In Standard mode, you manage cluster node pools. GKE supports NVIDIA GPUs and Google TPUs for containerized workloads.
GKE scales in several ways to match demand at two layers. Horizontal Pod Autoscaler (HPA) and Vertical Pod Autoscaler (VPA) add or remove containers based on demand, while the cluster autoscaler adds or removes nodes when container capacity requires it. Kueue orchestrates batch jobs within the cluster. Use GKE for distributed applications, general-purpose microservices, APIs, and other containerized applications.
Cluster orchestration for artificial intelligence (AI), machine learning (ML), and HPC is a specialized compute model for large-scale training, simulation, and high-performance workloads. Cluster Director is a managed service that automates deployment and lifecycle management for AI, ML, and HPC clusters. Google manages the cluster lifecycle and sets up a custom Ubuntu operating system designed for ML. It provides a ready-to-use environment with login nodes, compute nodesets, and deployment templates. Slurm creates nodes when CPU consumption increases and deletes nodes when they remain idle to prevent unnecessary charges. Cluster Director supports NVIDIA GPUs, including GB300 Ultra Superchips, GB200 Superchips, B200, H200, and H100, but it does not support Google TPUs.
Cluster Toolkit is an open-source tool used to provision and configure AI, ML, and HPC clusters on Google Cloud. It supports NVIDIA GPUs and Google TPUs, which you provision and configure with deployment templates called blueprints. These automated configuration files follow Infrastructure as Code (IaC) principles. Cluster Toolkit deploys compute instances or GKE resources inside your Google Cloud project. After deployment, you maintain administrative control over the operating system, software settings, and cluster lifecycle. To scale capacity, you configure managed instance groups (MIGs) or GKE tools to add or remove nodes based on your template settings. Use Cluster Toolkit when you want automated deployment templates while keeping administrative control over your operating system and software stack.
Virtual machine compute on Google Cloud gives you self-managed virtual servers with the most control over the operating system and infrastructure. Compute Engine (opens in a new tab) is Google Cloud's core Infrastructure as a Service (IaaS) platform. It lets you create and run VM and bare metal instances on Google's physical hardware. You retain complete control over the operating system, kernel settings, and boot files, and you select CPU processors, memory configurations, storage types, and guest operating system. Compute Engine supports NVIDIA GPUs and Google TPUs, which you attach to your compute instances.
Compute Engine orchestration is manual, so reliability depends on your configuration. You set up and manage your own compute instances, network rules, traffic routes, and backup systems for reliability. To scale capacity, you add or remove compute instances as needed, use custom tools, or configure managed instance groups (MIGs). Compute Engine offers machine families for general-purpose, compute-optimized, network-optimized, storage-optimized, memory-optimized, and accelerator-optimized workloads, plus custom machine types with customized CPU and memory. It provides extensibility with other Google Cloud services, scalability, a minimum uptime service level objective (SLO) of 99.5%, and pay-for-use pricing with no up-front costs.
VMware Engine is a managed service that lets you run VMware virtual machines on Google hardware without application modifications. It does not support GPUs or TPUs. Use VMware Engine to migrate on-premises VMware workloads to Google Cloud infrastructure with minimal operational changes.
Compute Engine deployment strategy depends on workload requirements. Assess application state: stateful applications store data such as client or session ID until it is no longer needed, while stateless applications do not need to store client, transaction, or session data. Then assess provisioning needs, such as whether to use a mix of machine types or images, automatic scaling, a single zone, virtual private cloud (VPC) network, and subnet, or low-latency placement near other resources. Assess operations needs, such as managing VMs as a single group, using custom or third-party tools, controlling failed VMs, or controlling the start-stop-suspend-resume schedule. Assess resilience needs, such as protection against zonal failures, automatic VM recreation, and fixed internal or external IP addresses.
Management responsibility and tradeoffs describe the main exchange between configuration flexibility and management effort. VMs and containers provide more configuration flexibility, but you are responsible for managing the resources. In a serverless architecture, you deploy workloads to a preconfigured platform that requires minimal management effort. Serverless options such as Cloud Run and Batch scale with demand and stop resources when work is complete.
Cost and operational constraints also shape the choice. Compute Engine offers pricing options such as committed use discounts (CUDs), sustained use discounts, and Spot VMs. Autoscaling options include Compute Engine MIGs, GKE autoscaling, and Cloud Run built-in autoscaling. Budgets and alerts help track spending, and tagging and labeling help categorize resources for cost analysis.
Exam tip: Choose Cloud Run when Google should manage all infrastructure; choose Compute Engine when you want to manage VMs or bare metal instances yourself.
Evaluating constraints involving cost, performance, and operational control means comparing what a compute option lets you customize against what it costs to run and manage over time. In Google Cloud, compute (opens in a new tab) refers to virtualized processing power and memory that ranges from raw virtual machine (VM) instances to fully managed platforms. The right choice depends on pricing structure, performance needs, regional availability, and how much control you need over the operating system and runtime.
Control over the runtime environment describes who manages the operating system, middleware, and orchestration versus who manages the underlying servers, virtualization, storage, and networking. Compute Engine as Infrastructure as a Service (IaaS) gives the most control because you choose the machine series, guest operating system, storage, and accelerators such as graphics processing units (GPUs) or tensor processing units (TPUs), while Google manages the physical infrastructure. Google Cloud VMware Engine follows the same split for VMware workloads, where Google manages the hardware and VMware platform and you retain full control over VMs, guest operating systems, and applications without re-architecting.
Managed platforms shift more responsibility to Google to reduce operational work. Batch provisions Compute Engine resources to run jobs and manages their lifecycle, so you do not manage the VMs directly. Cloud Run is a fully managed serverless platform where containers scale in response to web requests or events without managing servers or clusters. Google Kubernetes Engine (GKE) splits responsibility in the middle, where Google manages the Kubernetes control plane and you deploy and manage container workloads, with Autopilot mode providing more automation and Standard mode providing more infrastructure control.
Cost constraints come from the machine size you pay for, the provisioning model you choose, and the licenses and quotas that limit what you can run. Compute Engine provides machine type recommendations to match resources to workload needs, and custom machine types let you size CPUs and memory independently to avoid paying for unused capacity. Stateless managed instance groups (MIGs) support autoscaling to add VMs when traffic rises and remove them when demand falls, which lowers cost during idle periods, while stateful MIGs cannot be autoscaled.
Pricing and licensing choices create a direct tradeoff between discount and stability:
Exam tip: Choose Spot VMs only for fault-tolerant, batch, or short-lived work that can handle preemption; choose reservations or on-demand capacity when stability matters.
Performance and location constraints determine whether the required machine types, accelerators, and storage speed are available where users and data reside. Region selection (opens in a new tab) affects end-user latency, service availability, machine-type availability, resource cost, cross-regional data transfer cost, regulatory requirements, and sustainability goals. These factors involve tradeoffs, because the most cost-efficient region might not have the lowest carbon footprint or the lowest latency for users.
Storage and hardware choices further constrain performance and resilience. Zonal Persistent Disk volumes keep data in one zone, while regional Persistent Disk volumes synchronously replicate data across two zones in a region for greater durability. Google Cloud Hyperdisk provides more tuning than Persistent Disk, where Hyperdisk Balanced lets you provision input/output operations per second (IOPS) and throughput separately, and Hyperdisk Extreme provides higher maximum IOPS and throughput than solid-state drive (SSD) Persistent Disk. For shared and multi-region needs, a Filestore regional instance synchronously replicates across three zones, and Cloud Storage dual-region buckets with turbo replication provide a 15-minute recovery point objective (RPO) across regions.
How constraints shape long-term operations reflects the tradeoff between configuration flexibility and management effort across VMs, containers, and serverless platforms. VMs and containers provide more control over the operating system and software stack, but you remain responsible for patching, scaling, and managing resources. Serverless platforms deploy workloads to a preconfigured platform that requires minimal management, which lowers operational overhead but reduces customization.
The three compute models divide operational responsibility as follows:
| Compute model | Who manages infrastructure | Choose when |
|---|---|---|
| Compute Engine VMs | You manage OS, middleware, and apps; Google manages virtualization, servers, storage, and networking | The workload needs custom OS settings, specialized drivers, or license-restricted software |
| Google Kubernetes Engine (GKE) containers | Google manages control plane; you manage container workloads and choose Autopilot or Standard control | The workload is containerized and needs orchestration, scaling, and portability |
| Cloud Run serverless containers | Google manages infrastructure, OS, and runtime; you focus on code and events | The workload responds to requests or events and should scale without cluster management |
Highly managed deployment with Cluster Director, Cluster Toolkit, and GKE automates setup of compute, networking, and storage for artificial intelligence (AI), machine learning (ML), and high performance computing (HPC) clusters. Less managed deployment means you manually create VMs and orchestration layers for full customization. Choosing more automation lowers day-to-day operational cost but limits control, while choosing more control increases flexibility but raises long-term responsibility for reliability, updates, and scaling.
Choose Cloud Run when you want Google to manage all infrastructure for containerized web services or jobs with frequent deploys and variable traffic. Choose Google Kubernetes Engine (GKE) for distributed microservices needing container orchestration and coordinated scaling, and choose Compute Engine when you want to manage VMs or bare metal instances yourself with control over the operating system, kernel, machine type, storage, and network.
In both modes Google manages the operating system and the Kubernetes control plane for security and system availability. In Autopilot mode Google also manages nodes and capacity adjustments without manual intervention, while in Standard mode you manage cluster node pools.
Spot VMs cost significantly less than regular VMs and offer the same machine types and performance, but Compute Engine can preemptively stop or delete them to reclaim capacity. Use them only for fault-tolerant, batch, or short-lived work that can handle preemption, and use reservations or on-demand capacity when stability matters.
A retail organization is designing the cloud architecture for a new event-driven order processing application. During planning, the architecture and finance teams establish the following constraints:
Which Google Cloud compute option and configuration best addresses these constraints?
Deploy the application on Cloud Run and configure autoscaling with maximum scaling limits
Deploy the application on Compute Engine using Spot VMs and custom machine types
Deploy the application on Compute Engine sole-tenant nodes with CPU overcommit enabled
Deploy the application on Compute Engine using a 3-year resource-based committed use discount (CUD)
Last updated