Choosing Compute: GCE, GKE, Cloud Run, Cloud Functions

Google ACE ACE · Planning and implementing a cloud solution

By Abu Anns · Last updated 20 November 2026Exam version: ACE (exam guide live 30 June 2026)

The compute decision

Google Cloud offers four main ways to run application code, and choosing between them is one of the most tested skills on the ACE exam. The options form a spectrum from most control to least management: Compute Engine (virtual machines you manage yourself), Google Kubernetes Engine (managed Kubernetes for containers), Cloud Run (managed containers that scale to zero), and Cloud Functions (single-purpose functions triggered by events). There is no universally best choice — the right answer depends on the workload's shape, and the exam tests whether you can match the workload to the service.

The decision usually turns on a few questions. Does the workload need a specific operating system or long-running state? That points to Compute Engine. Is it a containerized application with complex orchestration needs, multiple services, or custom networking? That points to GKE. Is it a containerized web service or API that should scale automatically, including down to zero when idle? That points to Cloud Run. Is it a short piece of code that runs in response to an event — a file uploaded to Cloud Storage, a message on Pub/Sub? That points to Cloud Functions. When a question describes a workload, look for these signals before looking at the options.

Compute Engine

Compute Engine provides virtual machines (VMs) running on Google's infrastructure. You choose the machine type (how many vCPUs and how much memory), the operating system image, the disks, and the network settings, and you manage the OS yourself — patching, configuration, and scaling. Compute Engine is the right choice when you need full control: custom kernels, licensed software that requires a specific OS, legacy applications that cannot be containerized, or workloads with special hardware needs such as GPUs or TPUs. It is also the choice when an application must run continuously with predictable performance. The trade-off is operational effort: you own the machine, including its maintenance.

Two cost features matter for the exam. Spot VMs are spare capacity sold at a deep discount (60–91% off regular prices) with one catch: Google can reclaim them at any time with a 30-second warning. They suit fault-tolerant, interruptible workloads — batch processing, rendering, data analysis jobs that can checkpoint and resume — and they are the wrong choice for anything that must stay up. Custom machine types let you choose an exact vCPU and memory combination instead of picking from predefined machine types, which saves money when a workload needs an unusual ratio (lots of memory, few CPUs, for example). Predefined machine types come in families optimized for different needs: general-purpose (N2, N2D, E2), compute-optimized (C3, C2), memory-optimized (M3, M2), and accelerator-optimized (G2, A3) for GPUs.

Google Kubernetes Engine

Google Kubernetes Engine (GKE) is Google's managed Kubernetes service: you deploy containerized applications, and GKE manages the control plane while you manage (or, with Autopilot, mostly avoid managing) the nodes. GKE is the right choice for containerized applications that need Kubernetes features — service discovery, rolling updates, horizontal pod autoscaling, complex networking, or multi-service architectures — and for teams that already run Kubernetes or need portability across clouds. GKE comes in two modes: Standard, where you configure and manage node pools yourself, and Autopilot, where Google manages the nodes, applies security hardening, and bills you for the pod resources you request rather than the nodes underneath. Autopilot is simpler and is usually the better recommendation for a team that wants Kubernetes without the operational overhead.

Cloud Run and Cloud Functions

Cloud Run is a fully managed platform for running containers: you provide a container image, and Google handles the infrastructure, scaling, and HTTPS endpoints. It scales automatically from zero to thousands of instances based on traffic, and you pay only for the CPU and memory your containers actually use while handling requests (plus a small charge for idle instances if you set a minimum). Cloud Run is the best fit for containerized web services, APIs, and microservices where you want serverless simplicity but need the flexibility of a container — any language, any runtime, any binary. Its limits matter for the exam: a request can run for at most 60 minutes, and each container instance handles one request at a time by default (configurable up to 1,000 concurrent requests per instance).

Cloud Functions (the 2nd generation runs on Cloud Run infrastructure) is for single-purpose functions: small units of code that run in response to an event. A function that resizes an image when it is uploaded to Cloud Storage, or processes a message from Pub/Sub, is the classic use case. Functions are simpler than Cloud Run services — you deploy code, not a container — but they are also more constrained: they are short-lived, stateless, and designed around one trigger. When a question describes an event-driven task with no need for a container or a web server, Cloud Functions is the answer; when it describes a web service or API, Cloud Run is.

Comparing the options

ServiceYou manageBest forScaling
Compute EngineOS, patching, scalingFull control, legacy apps, GPUs, custom OSManual or managed instance groups
GKEPods and workloads (Autopilot) or nodes too (Standard)Container orchestration, microservices, portabilityNode and pod autoscaling
Cloud RunJust the containerContainerized web services and APIsAutomatic, to zero
Cloud FunctionsJust the codeShort event-driven tasksAutomatic, to zero

A useful exam heuristic: the more the question emphasizes "no server management" and "scale to zero", the further toward Cloud Run and Cloud Functions the answer lies. The more it emphasizes control, customization, or existing Kubernetes investment, the further toward GKE and Compute Engine. And whenever the workload is described as fault-tolerant batch work with a tight budget, Spot VMs should be in the answer.

Cost levers and machine families

Two pricing mechanisms apply across Compute Engine and GKE and are worth knowing for cost questions. Committed use discounts reduce prices substantially — up to 57% for most Compute Engine machine types, depending on the term — in exchange for committing to a level of usage for one or three years. They suit steady, predictable workloads where the commitment is safe. Sustained use discounts apply automatically to Compute Engine VMs: the more a VM runs during a month, the lower its effective hourly price, with no commitment required. Neither mechanism applies to serverless services, which bill only for what they use — the cost lever there is scaling to zero, not commitment. When a question asks how to reduce the cost of a workload that runs continuously, committed use discounts are usually part of the answer; when it runs intermittently, serverless or Spot VMs are.

Machine type families are the other planning detail. General-purpose families (E2, N2, N2D) balance CPU and memory for ordinary workloads and are the default choice. Compute-optimized families (C2, C3) offer the highest performance per core for CPU-hungry work such as batch processing, gaming servers, and high-performance computing. Memory-optimized families (M2, M3) provide very large memory per core for in-memory databases and analytics. Accelerator-optimized families (A3, G2) attach GPUs or TPUs for machine learning and graphics. The exam rarely asks you to name a family from memory, but it does test the mapping: a question describing a memory-hungry database should point you to memory-optimized, and one describing a GPU workload to accelerator-optimized. When in doubt, general-purpose is the safe default — and a custom machine type is the answer when the workload's ratio does not match any family.

Advertisement

Exam traps to watch for

Practice questions

Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.

Q1.A company wants to run a containerized REST API that receives unpredictable traffic — sometimes thousands of requests per minute, sometimes none for hours. They want no server management and to pay only for what they use. Which service is the best fit?

Report an error

Q2.A media company runs a nightly video-rendering batch job. The job is fault-tolerant: if a machine is interrupted, the job restarts from its last checkpoint. The company wants to minimize the cost of the compute. What should you recommend?

Report an error

Q3.A developer needs a VM with 6 vCPUs and 48 GB of memory — a ratio that does not match any predefined machine type. What should they use?

Report an error

Q4.A team wants to run a multi-service containerized application with service discovery, rolling updates, and horizontal pod autoscaling, and they want Google to manage the cluster nodes. Which option fits best?

Report an error

Q5.A company needs to process images uploaded to a Cloud Storage bucket: each upload should trigger a short task that creates a thumbnail and writes metadata to Firestore. Which service is the simplest fit?

Report an error

Q6.A legacy application requires a specific Linux kernel version and a licensed third-party agent that must be installed on the host operating system. Which compute option should you choose?

Report an error

Q7.Which statement about Spot VMs is correct?

Report an error

Q8.A startup is building a web application and expects traffic to grow from a few users to thousands over the first year. They have no operations staff and want the platform to handle scaling automatically. They have already containerized the application. Which service should they choose?

Report an error