AlgoViz

The Google Cloud outage of 2025

medium 30 min

On June 12, 2025 a policy record with blank fields was copied to every Google Cloud region within seconds.

Video lesson · Chapter 1 of 5

The change that woke an old path

0:00 / 4:10

A blank record in 75 seconds

1:15Reel coming soon

Theory

Read or listen first. About 2 min.

What it is

Every call to a Google Cloud API passes a checkpoint. It asks: is this caller allowed, and is there quota left? The program that does this is called Service Control. It runs in each region and reads its policies from a database in the same region.

On May 29, 2025 new code for additional quota checks was rolled out, region by region. No policy used it yet. On June 12 a policy change with unintended blank fields was inserted. Because quota is managed globally, the record was replicated to all regions within seconds. Each Service Control read it, followed a null pointer and crashed, again and again. API requests were answered with 503.

The facts and times on this page are from Google's incident report. Where we add a design idea of our own, we say so.

Why it exists

The code had been released carefully, in stages. The data had not. A stage without the trigger proves nothing, so the real release of the new code was the moment the data arrived, everywhere at once.

It is also a good lesson in repair. An off switch was prepared in advance, and it worked. Then the recovery itself created a new overload, because all tasks came back together.

And it shows the cost of depending on yourself: the status page was down with the outage, so the first public notice came about an hour late.

A short history

  1. May 29, 2025

    New quota policy checks are added to Service Control, rolled out region by region, without a feature flag.

  2. June 12, 2025, about 10:45 AM PDT

    A policy with blank fields is inserted and replicated worldwide within seconds. Crashes begin.

  3. June 12, 2025, 11:46 AM PDT

    First entry on the public Cloud Service Health page.

  4. June 12, 2025, 1:49 PM PDT

    End of the main incident in the mini report, about three hours after its start. Some products need longer.

  5. June 13, 2025

    Google publishes the full incident report.

Words to know

Service Control
The program that checks policy and quota for each API request.
Control plane
The part that decides and manages. The data plane does the running work.
Quota
How many requests or resources a customer may use.
Null pointer
A reference to nothing. Using it without a check ends the program.
Crash loop
Start, read the same bad input, crash, start again.
Feature flag
A switch that turns new code on for a small group first.
Red button
Google's name for the switch that turns a serving path off.
Herd effect
Many clients ask at the same moment and overload what they need.
Fail open
If a check cannot run, let the request pass.
Exponential backoff with jitter
Wait longer after each failure, with a random part.

How it works

Step through the idea, or press Play.

Step 1 of 3

Sleeping code. Released in stages, never used

Understand it

Start here

The blank stamp card

A company runs three parks. Each has turnstiles that look at a rule card before they let a visitor in.

One card for every park
Today's cardGONew reader

The turnstiles were fine. The card that all of them shared was not.

What happened

The timeline

June 12, 2025, US Pacific time

WhenWhat happened
May 29New quota checks released, region by region
About 10:45 AMPolicy with blank fields inserted, copied worldwide in seconds
10:49 to 10:51 AMStart of impact (49 in the mini report, 51 on the page)
Within 2 minSite reliability engineers triage
Within 10 minCause found, red button being prepared
About 25 minRed button ready to roll out
Within 40 minRed button rollout complete, recovery begins
11:46 AMFirst public entry on the health page
12:48 PMAll regions except us-central1 mitigated
1:49 PMEnd in the mini report
6:18 PMLast product fully recovered
The minutes count from the start of the incident. The report uses round numbers, and its three entries differ by a few minutes.

Three lengths of one outage

10:49→12:48=119 min10:49→13:49=180 min10:51→18:18=447 min10{:}49 \to 12{:}48 = 119\ \text{min} \qquad 10{:}49 \to 13{:}49 = 180\ \text{min} \qquad 10{:}51 \to 18{:}18 = 447\ \text{min}
Most regions, the main incident, and the last product. Always ask which of them a number means.

How it works

The checkpoint for API requests

Google describes management and control planes that are distributed over regions. For each incoming request they make sure that it is authorised and that policy and quota allow it. Service Control is the core of the policy check.

One region

Callers outside Google Cloud send API requests. In one region Service Control reads policies from the regional Spanner table and passes requests to the product API. Running virtual machines work without this path.
Each solid box is one service. Running machines and streams do not pass through the checkpoint.

A normal request

A simplified view. If Service Control has crashed, nobody answers the second arrow, and the caller receives a 503.
PartReachSpeed of change
Service Control binaryPer regionRegion by region, over days
Policy tablePer regionFilled by global replication
Policy dataWhole worldSeconds
Red buttonWhole worldMinutes, with a rollout
The fastest row decides how far a fault can travel before anyone sees it.

The cause

Four things that had to be missing

  • Error handling

    The path did not handle blank fields. A null pointer ended the program.

  • Feature flag

    Without a flag the path could not be enabled for internal projects first. Google writes that a flag would have caught it in staging.

  • Steps for data

    Policy data went to all regions in seconds, with no pause to look.

  • Backoff

    Restarting tasks did not wait for a random time, so they met at the database.

Why the staged code release found nothing

A stage tests only what runs during the stage.
Python
policy = {"id": "quota-7", "limit": None}   # a blank fielddef check_then(policy, used):    return used < policy["limit"]            # fails on Nonedef check_now(policy, used):    limit = policy.get("limit")    if limit is None:        return True, "bad policy, let it pass and report"    return used < limit, Noneprint(check_now(policy, 5))
A small model of ours. Google has not published the code.

The spread

Regional code, global data

Seconds around the world

A policy change enters one regional Spanner table and is replicated to the tables of three regions, each with its own Service Control that crashes.
Three regions stand for all. The boundaries between regions stop a crash, but not the record that causes it.

Reach before detection

regions hit=min⁡(R, ⌊tdetecttstep⌋+1)R=40: tstep=0⇒40,tstep=15 min⇒1\text{regions hit} = \min\left(R,\ \left\lfloor \frac{t_{\text{detect}}}{t_{\text{step}}} \right\rfloor + 1\right) \qquad R = 40:\ t_{\text{step}} = 0 \Rightarrow 40,\quad t_{\text{step}} = 15\ \text{min} \Rightarrow 1
Example with 40 regions and detection after 10 minutes: one region per 15 minutes means one region is hit. With no pause between steps, all are.

Good reasons for global data

  • A quota is one number for the whole customer
  • A change should count everywhere
  • One copy of the truth is simple

What it costs

  • A bad record has no border
  • Regions are no longer independent
  • Rollback needs the same path

The response

Forty minutes to the switch

  1. 1

    Triage: 2 minutes

    Alerts came quickly, because every region failed in the same way.

  2. 2

    Cause: 10 minutes

    The path was known, and a red button existed for exactly this path.

  3. 3

    Ready: about 25 minutes

    The switch was prepared for rollout.

  4. 4

    Done: within 40 minutes

    The rollout was complete, and recovery began with smaller regions.

Compare with a fix in code: write, review, build, test and roll out a new binary. A switch that exists is faster than the best patch. Here it was decided when the code was written, two weeks before it was needed.

The herd

Why one region took much longer

When many Service Control tasks restart, each of them reads the policy table. In large regions such as us-central1 they did so together, and the table could not keep up. Reads failed, tasks tried again, and the load stayed. Engineers throttled the creation of tasks and sent traffic to multi-regional databases.

Spreading restarts (our example)

together: 6,0001 s=6,000/sover 60 s: 6,00060 s=100/s\text{together: } \frac{6{,}000}{1\ \text{s}} = 6{,}000/\text{s} \qquad \text{over } 60\ \text{s: } \frac{6{,}000}{60\ \text{s}} = 100/\text{s}
With a table that serves 500 reads a second, the first is 12 times too much and the second is 20% of capacity. Random delays make the second case happen without coordination.

Restart with and without jitter

See retries for backoff and jitter, and thundering herd for the same effect in caches.

Impact

Who felt it

Google lists more than 60 Google Cloud products, from IAM, Cloud Storage and BigQuery to App Engine, Cloud Run and Vertex AI, and Workspace products such as Gmail, Calendar, Drive, Docs, Chat and Meet. Customers had intermittent trouble with APIs and user interfaces. Existing streaming and IaaS resources were not impacted. Locations in all parts of the world were affected.

Some products recovered later, because they had a backlog or their own design. The last was Vertex AI Online Prediction, at 6:18 PM. Lists of customers, amounts of money and shares per continent are not in the report, so this page leaves them out.

The status page problem

NeedWhat happenedWhat to do
Tell customersFirst notice after about an hour, the health page was down tooHost status elsewhere
Let customers seeTheir monitoring on Google Cloud failed as wellA second signal outside
Know what to sayAutomatic and human messages were latePrepared texts and owners
The last column is the direction of Google's plan: keep monitoring and communication running when the products are down.

The repair

What Google announced, and what to design

AnnouncedMeaning
Freeze changes to Service Control and manual policy pushesNo new risk until the repair is done
Split it into modules that fail openOne failing check does not block requests
Audit globally replicated dataSpread in steps, with time to validate
Flags for critical binaries, off by defaultNew paths start with a small group
Better static analysis and testsErrors are handled
Random exponential backoff everywhereNo herds
Better and independent communicationPeople know early

A policy change in the repaired design

Incremental data, time to validate, and flags with internal projects first are in the report. The exact steps are our example.

The quota check cannot read its policy. What should a request get?

BreaksCrash or reject everything
How
No policy, no service.
Limit
A bad record becomes a global outage.
Choose when
Only for checks that protect people or data.
WorksAlways let it pass
How
Fail open for the whole checkpoint.
Limit
Permission checks must not be skipped.
Choose when
Only if the check is purely a limit.
StrongDecide per check
How
Quota: last good policy, then open. Permission: last good policy, then closed. Both report.
Limit
Two behaviours to test, and some abuse is possible while quota is open.
Choose when
Any checkpoint with several duties.

For the people who build it

  • Handle each optional field
  • A flag that is off, and a button that turns it off
  • Canary for data
  • Backoff and a limit on task starts

Anti-patterns

  • Assuming that a field is always filled
  • Regional code with instant global data
  • Restarts without a pause
  • Status on the same platform

Related: fallbacks, circuit breaker, failure models, rate limiting. The same lesson with a file instead of a record: the CrowdStrike outage of 2024.

Summary

The whole topic in one minute.

New code lay unused for two weeks, without error handling and without a feature flag. A policy with blank fields used it for the first time, in all regions within seconds, and Service Control crashed in a loop. Requests to APIs failed, while streaming and infrastructure that already ran were not impacted.

Engineers triaged within 2 minutes, found the cause within 10, and finished rolling out the red button within 40. Small regions recovered first. In us-central1 the restarting tasks overloaded the policy database, because restarts had no random backoff. That region took up to about 2 hours and 40 minutes.

Roll out data in steps, put new paths behind flags that are off, let non-critical checks fail open, spread restarts over time, and keep status and monitoring outside of what they watch.

  • Code was released in stages, but its trigger, the data, went everywhere in seconds.
  • Blank fields, no error handling, no flag: a crash loop in every region.
  • A prepared red button was rolled out within 40 minutes.
  • Restarts without random backoff overloaded the table in us-central1.
  • Stage the data, decide fail open per check, and keep the status page independent.

Sources