Study guide

12.1 Managing Cloud Run Revisions, Traffic Splitting & Scaling

Google Cloud Associate Cloud Engineer ACE

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Introduction & Exam Overview

1.1 About the GCP Associate Cloud Engineer Exam 1.2 How to Use This Study Guide & Build a Study Plan

2 Chapter 2: Resource Hierarchy, IAM Basics & Cloud Identity

2.1 The GCP Resource Hierarchy: Organizations, Folders & Projects 2.2 Organization Policies & Granting IAM Roles 2.3 Cloud Identity: Managing Users and Groups

3 Chapter 3: APIs, Quotas & Billing Configuration

3.1 Enabling APIs and Provisioning Cloud Operations Suite 3.2 Assessing and Requesting Quota Increases 3.3 Billing Accounts, Project Linking & Billing Exports 3.4 Billing Budgets and Alerts

4 Chapter 4: Planning Compute & Storage Resources

4.1 Choosing the Right Compute Option: GCE vs. GKE vs. Cloud Run vs. Cloud Functions 4.2 Spot VMs, Custom Machine Types & Cost-Optimized Compute Planning 4.3 Choosing a Data Storage Product: Cloud SQL, BigQuery, Firestore, Spanner & Bigtable 4.4 Cloud Storage Classes & Persistent Disk Types

5 Chapter 5: Planning Network Resources

5.1 Load Balancing Options and Use Cases 5.2 Regional Resource Placement & High Availability Planning 5.3 Network Service Tiers: Premium vs. Standard

6 Chapter 6: Deploying Compute Engine Workloads

6.1 Launching Compute Engine Instances: Disks, SSH Keys & Availability Policies 6.2 Managed Instance Groups, Instance Templates & Autoscaling 6.3 OS Login and VM Manager for Fleet Configuration

7 Chapter 7: Deploying Google Kubernetes Engine Workloads

7.1 Installing and Configuring kubectl 7.2 Deploying GKE Clusters: Autopilot, Regional, Private & GKE Enterprise 7.3 Deploying Containerized Applications to GKE

8 Chapter 8: Deploying Serverless & Event-Driven Applications

8.1 Deploying Applications to Cloud Run and Cloud Functions 8.2 Event-Driven Architectures: Pub/Sub, Cloud Storage Triggers & Eventarc

9 Chapter 9: Deploying Data Solutions

9.1 Deploying Data Products: Cloud SQL, Firestore, Spanner, BigQuery & AlloyDB 9.2 Deploying Pub/Sub, Dataflow & Loading Data into Google Cloud

10 Chapter 10: Deploying Networking Resources & Infrastructure as Code

10.1 Creating VPCs, Subnets & Shared VPC 10.2 Firewall Rules, Cloud VPN & VPC Network Peering 10.3 Infrastructure as Code: Terraform, Config Connector, Cloud Foundation Toolkit & Helm

11 Chapter 11: Managing Compute Engine & GKE in Production

11.1 Connecting to and Managing Running Compute Engine Instances 11.2 Working with Snapshots and Custom Images 11.3 Managing GKE Clusters: Node Pools, Workloads & Artifact Registry Access 11.4 Horizontal and Vertical Pod Autoscaling in GKE

12 Chapter 12: Managing Cloud Run, Storage & Database Operations

12.1 Managing Cloud Run Revisions, Traffic Splitting & Scaling 12.2 Managing and Securing Cloud Storage Objects & Lifecycle Policies 12.3 Querying, Estimating Costs, Backup & Job Monitoring for Databases (Cloud SQL, BigQuery, Spanner, Dataflow)

13 Chapter 13: Networking Operations, Monitoring & Logging

13.1 Networking Operations: Subnets, Static IPs, Cloud DNS & Cloud NAT 13.2 Cloud Monitoring: Alerts, Custom Metrics & Dashboards 13.3 Cloud Logging: Buckets, Log Analytics, Routers & Filtering 13.4 Diagnostics, Ops Agent, Managed Service for Prometheus & Audit Logs

14 Chapter 14: IAM Policies & Role Types

14.1 IAM Policies: Structure, Bindings & Policy Hierarchy 14.2 IAM Role Types: Basic, Predefined & Custom Roles

15 Chapter 15: Service Accounts & Security Configuration

15.1 Creating Service Accounts & Assigning Least-Privilege Permissions 15.2 Assigning Service Accounts to Resources & Managing SA IAM Policies 15.3 Service Account Impersonation & Short-Lived Credentials

16 Chapter 16: Exam Readiness — Scenarios & Test-Day Strategy

16.1 Common ACE Exam Scenarios & Decision Frameworks 16.2 Test-Day Logistics, Time Management & Final Review Checklist

12.1 Managing Cloud Run Revisions, Traffic Splitting & Scaling

Key Takeaways Explain This Topic AI

Every deploy or config change to a Cloud Run service creates a new immutable revision; a rollback is a traffic-split command, not a redeploy.

gcloud run services update-traffic with --to-revisions (percentages) or --to-tags controls exactly how traffic is split across revisions.

Deploying with --no-traffic plus a --tag lets you test a new revision at a dedicated URL before it receives any production traffic.

Minimum instances (default 0) eliminates cold starts; maximum instances (default 100) caps runaway scale/cost; concurrency defaults to 80 (max 1000).

CPU is allocated only during request processing by default; switch to CPU-always-allocated for background work after the response is sent.

Last updated: July 2026

Why This Matters for the ACE Exam

Google's own Associate Cloud Engineer exam guide lists three Cloud Run bullets under "Ensuring successful operation of a cloud solution": deploying new application versions, adjusting traffic splitting, and setting scaling parameters. In practice, ACE scenario questions in this area hand you a service that is already live and ask what happens the instant you deploy again, how to move traffic to a new version safely, or how to configure scaling so the service neither suffers cold starts nor runs away with cost during a spike. This section covers the operational side of Cloud Run — the day-two work that comes after the initial deployment you learned about in Chapter 8.

Revisions: The Core Concept

Every time you deploy a new container image or change the configuration of a Cloud Run service — CPU, memory, environment variables, concurrency, and so on — Cloud Run creates a new revision . A revision is an immutable, versioned snapshot of a service's code and configuration at the moment of deployment; once created, it never changes. Because revisions are immutable, Cloud Run can instantly redirect traffic between any two revisions of the same service without redeploying anything at all — a "rollback" is nothing more than moving traffic back to an older, still-running revision.

Cloud Run keeps a history of revisions for each service (subject to a per-service revision limit), and each one has a unique name such as hello-00005-red , letting you inspect, tag, or route to any specific revision by name.

Traffic Splitting

By default, a fresh deploy routes 100% of traffic to the newest revision immediately — there is no automatic canary step unless you ask for one. Traffic is controlled explicitly with: gcloud run services update-traffic SERVICE \

--to-revisions REVISION1=PERCENT1,REVISION2=PERCENT2

The percentages for every revision named in one command must sum to 100. For example, --to-revisions hello-00005-red=75,hello-00001-bod=25 sends three-quarters of requests to the newer revision and one quarter to the older one — a textbook canary split. Two shortcuts matter for the exam:

--to-latest always routes to whichever revision was deployed most recently, including ones deployed in the future (a "floating" alias rather than a fixed revision name).

--to-tags TAG_NAME=PERCENT routes a percentage of traffic by a human-readable tag instead of the generated revision ID.

Tags for Safe Testing

A tag is a label attached to a revision at deploy time with --tag TAG_NAME . Tagging creates a dedicated URL in the form https://TAG_NAME---SERVICE-HASH.a.run.app that always reaches that specific revision, with zero percent of the service's normal production traffic. This lets an engineer smoke-test a brand-new revision against real production dependencies (databases, downstream APIs) before it is exposed to a single customer request.

Gradual Rollouts: The Exam's Favorite Scenario

The recommended safe-deploy pattern, and the one ACE scenario questions describe most often, looks like this:

Deploy the new image without shifting any traffic: gcloud run deploy SERVICE --image IMAGE --no-traffic .

Optionally tag the new revision and hit its dedicated URL to validate it works.

Shift a small slice of production traffic while watching error rates and latency: gcloud run services update-traffic SERVICE --to-revisions LATEST=5 .

Increase the percentage incrementally — 5% → 25% → 50% → 100% — only if metrics stay healthy at each step.

If anything looks wrong at any step, immediately send 100% of traffic back to the previous, known-good revision. Because revisions are immutable, this "rollback" takes effect exactly as fast as any other traffic-split command — there is no redeploy involved.

  • Step Command Effect
  • Silent deploy gcloud run deploy --no-traffic New revision exists, 0% live traffic
  • Canary update-traffic --to-revisions NEW=5 5% of requests to new revision, 95% to old
  • Expand update-traffic --to-revisions NEW=50 Roughly half of requests to each revision
  • Full cutover update-traffic --to-latest 100% of requests to the newest revision
  • Rollback update-traffic --to-revisions OLD=100 Instantly reverts, no rebuild required

Note that traffic changes are not instantaneous for in-flight work: any request already being processed on the old revision runs to completion before that revision stops receiving new requests.

Scaling Parameters

Cloud Run scales each revision's instance count independently based on concurrent requests and CPU usage, targeting roughly 60% utilization per instance before adding another.

Setting Default Exam-relevant behavior

Minimum instances 0 Keeps N instances "warm" to eliminate cold starts, at a standing cost even with zero traffic

Maximum instances 100 A hard ceiling that caps runaway scaling and protects against a surprise bill during a spike

Concurrency 80 (Console); 80 x configured vCPU count (CLI/Terraform, new services only) Number of requests one instance handles simultaneously; configurable up to a hard ceiling of 1000

CPU allocation CPU allocated only during request processing Switch to "CPU always allocated" for background work — queues, async cleanup — that must keep running after the response is already sent

A classic exam scenario: "Users report noticeable latency only on the first request after a period of no traffic." The fix is raising minimum instances above zero, not increasing maximum instances (which only raises the scaling ceiling) or concurrency (which controls how much load one instance absorbs, not whether an instance exists at all).

Common Traps

Confusing Cloud Run's traffic-percentage model with GKE rolling updates. GKE gradually replaces Pods one at a time; Cloud Run instead routes a percentage of requests between two or more simultaneously running immutable revisions.

Forgetting --no-traffic . A plain gcloud run deploy sends 100% of traffic to the new revision the moment it becomes ready — there is no built-in canary delay.

Assuming a higher maximum-instances setting fixes cold starts. It only raises the ceiling on scale-out; minimum instances is what keeps instances warm.

Believing a rollback requires rebuilding or redeploying an image. It never does — it is purely a traffic-split command pointed at a revision that already exists.

Key Takeaways

A new deploy or config change always creates an immutable revision ; rollback is a traffic-split command, not a redeploy.

gcloud run services update-traffic with --to-revisions (by percentage) or --to-tags controls exactly how traffic is split.

--no-traffic plus --tag lets you validate a revision at a dedicated URL before it receives any production traffic.

Minimum instances solves cold starts; maximum instances caps cost and runaway scale; concurrency (default 80, max 1000) controls per-instance load; CPU always allocated supports post-response background work.