Google Cloud Service Control Outage
A policy record with blank fields replicated worldwide in seconds and hit an unhandled null pointer in every region at once.
- Severity
- Front-page news
- Difficulty
- intermediate
- Companies
- Tech
- Google Cloud, Spanner, API management, Feature flags
- Root cause
- latent bug, config pushed globally
The story
Quick (1 min)
On 12 June 2025, many Google Cloud and Google Workspace services started rejecting requests with 503 errors worldwide for about three hours.
Every Google Cloud API request passes through a checker called Service Control, which confirms the request is allowed and within quota. Two weeks earlier, new code had been added to it. That code had a bug, a null pointer (code that tried to use data that wasn't there), but it only ran when a certain kind of policy appeared.
On 12 June, such a policy was added, and it had blank fields. Policy data is copied around the world within seconds, so Service Control crashed in every region at the same time.
The lesson: new code paths should sit behind a switch that starts turned off, and global data changes should spread slowly.
Keep reading to the end to earn XP.Read. XP earned.
Engineer (2 min)
Service Control. Google's API management and control planes check each API request for authorisation, policy and quota. The core binary, Service Control, is regional and reads quota and policy data from a regional Spanner datastore. That metadata replicates globally almost instantly.
The latent bug (29 May). A new feature added extra quota policy checks. The binary rolled out region by region, but the new code path never ran during rollout, because it needed a specific policy change to trigger it. It had a "red button" kill switch, but no proper error handling and no feature flag. Google's report: "If this had been flag protected, the issue would have been caught in staging."
The trigger (12 June, ~10:45 PDT). A policy change containing unintended blank fields was written to the regional Spanner tables and replicated globally within seconds. Each region's Service Control read the blank fields, hit the null pointer, and went into a crash loop.
Response:
- SRE triaging within 2 minutes; root cause identified within 10 minutes.
- The red button was ready at about 25 minutes and fully rolled out at about 40 minutes. Smaller regions recovered first.
- In big regions like us-central1, restarting Service Control tasks created a herd effect on the Spanner table. It had no randomized exponential backoff. Full recovery took up to about 2h40m there, by throttling task creation and routing to multi-regional databases.
Communication. Google's Cloud Service Health page was itself affected, so the first public report came about an hour in. Some customers' monitoring, also running on Google Cloud, failed too.
Interview takeaway: fail open on non-essential checks, flag-protect new code paths, roll out data gradually, and back off with jitter when restarting.
Keep reading to the end to earn XP.Read. XP earned.
Deep dive (2 min)
Timeline (US/Pacific, from Google's incident reports)
- 29 May 2025: a new quota policy feature is added to Service Control. It rolls out region by region, but the failing path is never exercised. It has a red-button kill switch, but no error handling and no feature flag.
- 12 June, ~10:45: a policy change with unintended blank fields is inserted into the regional Spanner tables and replicated globally within seconds.
- 10:49: incident start (mini report). Service Control binaries crash-loop globally, and external API requests get 503s.
- +2 min: SRE triaging. +10 min: root cause identified, red button preparation begins.
- +~25 min: red button ready. +~40 min: rollout complete, and recovery begins with smaller regions.
- ~11:49: first public incident report, delayed because Cloud Service Health infrastructure was down.
- 12:48: all regions except us-central1 mitigated.
- 13:49: incident end. us-central1 took up to ~2h40m because of herd effects on Spanner.
Why it spread everywhere at once
"Given the global nature of quota management, this metadata was replicated globally within seconds."
The binary rollout was staged, but the data that triggered the bug wasn't. Staging the binary didn't help because the new path only ran when certain data appeared.
Customer impact
Intermittent API and UI access issues across dozens of products, including IAM, Cloud Storage, BigQuery, Cloud Run, Cloud Monitoring and Vertex Gemini API. "Existing streaming and IaaS resources were not impacted." Some products had residual backlogs afterwards.
Google's commitments
- Freeze all changes to the Service Control stack and manual policy pushes until remediated.
- Modularise Service Control so functionality is isolated and fails open, so API requests can still be served if a check fails.
- Audit systems that consume globally replicated data: propagate incrementally, "with sufficient time to validate and detect issues."
- Feature-flag-protect all changes to critical binaries, disabled by default.
- Improve static analysis and testing of error handling.
- Audit for randomized exponential backoff.
- Keep monitoring and communication infrastructure working even when Google Cloud is down.
Keep reading to the end to earn XP.Read. XP earned.
Failure replay
Step by step, what broke and what it hit next. Showing the key steps. Switch to Engineer or Deep dive for every step.
- May 29Service Control codedegraded
New quota-check code rolls out region by region. It lacks error handling and a feature flag, and its path never runs during rollout.
Affects: Service Control (all regions)
- Jun 12, ~10:45Policy datastorefailing
A policy change with blank fields is written to Spanner and replicated globally within seconds.
Affects: Service Control (all regions)
- 10:49Service Control (all regions)down
Every region reads the blank fields, hits a null pointer and crash-loops.
Affects: Cloud customers
- 10:49Cloud customersdown
API requests to dozens of Google Cloud and Workspace products return 503 errors.
- +10 minSRE teamdegraded
Root cause found in 10 minutes. Engineers prepare the red button that disables the new path.
Affects: Service Control (all regions)
- +40 minService Control (all regions)recovering
Red button fully rolled out. Smaller regions recover first.
Affects: Policy datastore
- +40 min – 2h40mPolicy datastoredegraded
In us-central1, restarting tasks stampede the Spanner table because there's no randomised backoff. Engineers throttle and reroute.
- 13:49Cloud customershealthy
All regions recover after about 3 hours, and some products drain backlogs.
Impact
- Who was affected
- Google Cloud, Google Workspace and Google Security Operations customers worldwide using external APIs; existing streaming and IaaS resources were not impacted.
- How long
- About 3 hours (10:49 to 13:49 PDT); most regions mitigated in about 2 hours.
- Cost
- not disclosed
Lessons
- Put new code paths behind feature flags that are off by default; a staged binary rollout doesn't test unused paths.
- Handle missing or invalid data defensively; crash loops on bad input are avoidable.
- Propagate global configuration and metadata gradually, with validation, even when speed matters.
- Non-essential checks should fail open so the core service keeps working.
- Restarting fleets need randomised exponential backoff to avoid stampedes.
Quiz
Why didn't the region-by-region rollout on 29 May catch the bug?
The answer is The faulty code path only ran when a specific policy change appeared, so it never executed during rollout. The new path needed a triggering policy change. Without a feature flag, the code was live but untested in practice.
Check answer
The faulty code path only ran when a specific policy change appeared, so it never executed during rollout. The new path needed a triggering policy change. Without a feature flag, the code was live but untested in practice.
What made Service Control crash?
The answer is A policy with blank fields hit code with no error handling, causing a null pointer crash. The blank fields triggered a null pointer in the new quota-check code, and binaries crash-looped.
Check answer
A policy with blank fields hit code with no error handling, causing a null pointer crash. The blank fields triggered a null pointer in the new quota-check code, and binaries crash-looped.
Why did us-central1 take longer to recover?
The answer is Restarting tasks created a herd effect on the Spanner table because there was no randomised exponential backoff. Mass restarts overloaded the underlying datastore. Recovery took up to about 2h40m there.
Check answer
Restarting tasks created a herd effect on the Spanner table because there was no randomised exponential backoff. Mass restarts overloaded the underlying datastore. Recovery took up to about 2h40m there.
Which change did Google commit to for critical binaries?
The answer is All changes must be feature-flag protected and disabled by default. Flags let new features be enabled gradually per region and project, starting with internal ones.
Check answer
All changes must be feature-flag protected and disabled by default. Flags let new features be enabled gradually per region and project, starting with internal ones.
Interview prep
Try answering out loud before you open the model answer.
- system design
Your policy service crashed in every region at once because of bad replicated data, even though code rollouts were staged region by region. How would you redesign it?
Show model answer
Stage data as well as binaries. Replicate policy changes incrementally, starting with one region or internal projects, with validation and health checks before global spread. Validate data on write (reject blank required fields) and handle it defensively on read. Put new code paths behind default-off flags enabled gradually per region and project. Design the check to fail open for non-critical policies so API serving continues. And make restarts back off with jitter so recovery doesn't overload the datastore.
A strong answer hits:
- Staged data propagation, not just staged binaries
- Validate on write, defensive reads
- Default-off feature flags
- Fail open and backoff with jitter
How did your answer compare? - debugging
After deploying a fix, small regions recover but your biggest region stays down for hours. What's likely happening?
Show model answer
A thundering herd. When many tasks restart at once, they all hit shared dependencies, like Google's Spanner table, at the same moment and overload them, so they fail and retry again. The biggest region has the most tasks, so it suffers most. Mitigate by throttling task creation, adding randomised exponential backoff, shedding load or routing reads to other replicas, and bringing capacity back gradually.
A strong answer hits:
- Synchronised restarts overload shared dependencies
- Larger regions have more tasks, so a bigger herd
- Throttle, backoff with jitter, reroute load
How did your answer compare? - behavioural
Your status page and your customers' monitoring went down with your platform. What would you change?
Show model answer
Communication infrastructure must not share fate with the product. Host the status page on independent infrastructure, pre-write incident templates, and have a fallback channel such as social or email. Advise customers to keep at least some external monitoring outside your platform. Google committed to keeping monitoring and communication working even when Google Cloud is down.
A strong answer hits:
- Independent status page infrastructure
- Fallback communication channels
- Encourage external monitoring for customers
How did your answer compare?
Go deeper
- Official postmortemGoogle Cloud Service Health incident report (12 June 2025)Google Cloud Service Health, link checked 2026-11-25