Scrivio Interview library
DebuggingFoundations5 min read · updated 13 November 2026

A booking service runs active-active in two regions, each handling half the traffic at about 65 percent CPU at peak. At 12:05 region A starts returning 30 percent errors, and at 12:10 the team moves all traffic to region B. By 12:15 region B is failing too.

Why did region B fail, and what should the capacity rule and the failover procedure have been?

Region B suddenly received twice its load: 65 percent CPU doubled is about 130 percent of capacity, so it saturated and failed. With two active regions, each must keep normal peak below about 50 percent, or be able to grow before the traffic arrives, and that rule applies to every tier, including databases, caches, queues and third-party quotas. The failover should have moved traffic in steps such as 10, 25, 50 and 100 percent while watching errors, considered moving only part of the traffic since A was only partly failing, and relied on load shedding in B to keep most users served.

Why this question is asked

Active-active is supposed to make region failures survivable, which is why this incident is so painful: the team did exactly what the design promised, moved traffic to the healthy region, and turned a partial outage into a total one. Interviewers ask it to see whether we can reason about capacity under failover and whether we know that how we move traffic matters as much as where we move it. In this answer, we will work out why region B failed, state the capacity rule for every tier, look at a stepped failover procedure, consider partial moves and load shedding, and answer how the rule changes with three regions.

1Why Region B Failed

Each region handled half the traffic at about 65 percent CPU at peak. When all traffic moved to B, B had to do the work of both regions: 65 percent x 2 = 130 percent of its capacity. A region at 130 percent cannot keep up. Requests queue, latency rises past client timeouts, clients retry, and the retries add more load. Within five minutes, B was failing too.

So active-active only provides failover capacity if each region has room for the other's traffic. At 65 percent, it did not. The design looked redundant on the architecture diagram but was not redundant in capacity.

2The Capacity Rule, for Every Tier

With two active regions, each must be able to carry 100 percent of peak traffic alone. If we want to stay below a safe ceiling of about 100 percent of capacity after failover, each region must run below about 50 percent at normal peak. Teams that want a safety margin after failover, say 80 percent, need normal peak below 40 percent. The alternative is to be able to grow before the traffic arrives, for example by scaling B up first, which takes time and depends on the provider's control plane.

The rule must cover every tier, not just application servers. In this incident, B's databases, caches, message queues and connection pools also saw doubled load. Third-party quotas matter too: a payment provider or a maps API may limit requests per region or per key, and those limits were sized for half the traffic.

Headroom check for region B before a full failover
TierNormal peakAfter failoverOK?
Application CPU65%130%No: must be below 50% normally
Database CPU40%80%Yes, with little margin
Cache memory and ops55%110%No
DB connection pool120 of 200240 of 200No
Payment provider quota300 rps of 500600 rps of 500No: raise the quota
Every tier that doubles must have room to double.

3Shift Traffic in Steps

Even with enough headroom, moving all traffic at once is risky. Autoscaling needs minutes to add instances, connection pools need to open connections, JIT compilation in JVM services needs to warm up, and caches in B do not yet hold the data that A's users ask for, so the first minutes send many extra queries to B's databases.

So the procedure shifts traffic in steps, such as 10, 25, 50 and 100 percent of A's share, with a pause at each step to watch error rate, latency and saturation in B. If B's signals degrade, we stop or step back. Weighted DNS records or a global load balancer with traffic weights make this easy, and the steps should be scripted in advance.

Step throughA stepped failover from A to B
  1. Move 10% of A's traffic to Bweighted DNS or global load balancer
  2. B healthy after 2 to 3 minutes?errors, p99, CPU, pools
    YesNext step: 25%, 50%, 100%NoStop, hold or step back
  3. Shed low-priority work in B if near limitkeep checkout and login
  4. All of A's traffic in Bonly if A is truly lost

4 steps in order. Play them, or step through them one at a time.

4Was a Full Move Even Right?

Region A was returning 30 percent errors, which means it was serving 70 percent of its requests correctly. Moving everything gave up that working capacity. Moving part of the traffic, enough to bring A's error rate down if the problem was load-related, or shedding low-priority work in A, may have served more users than a full move.

The decision depends on the cause. If A is failing because of a broken dependency that every request needs, moving traffic is right. If A is partly degraded, a partial move keeps both regions useful. Runbooks should ask that question explicitly instead of defaulting to all or nothing.

5Load Shedding as the Safety Net

Once B was overloaded, there was still a better outcome than everyone timing out. Load shedding, rejecting excess requests quickly with a 503 when the service is at capacity, keeps the accepted requests fast. If B can serve 100 percent of its capacity and receives 130, shedding the extra 30 percent, starting with low-priority traffic, keeps roughly three quarters of users served at good latency.

That buys time to add capacity in B or recover A. Without shedding, every request in B waited in the same growing queue, and almost all of them timed out, so the effective capacity dropped far below 100 percent.

6Follow-up questions

How does the headroom rule change with three active regions?

With three regions each carrying a third of traffic, losing one region spreads its third over the remaining two, so each survivor goes from one third to one half of total traffic, an increase of 50 percent. To stay below 100 percent of capacity after failover, each region must run below about two thirds, 67 percent, at normal peak, instead of 50 percent with two regions. More regions mean less idle capacity, the same pattern as with zones, but more regions also mean more data replication and operational cost.

How do you know the headroom is real?

By testing it. Regular drills shift a meaningful share of traffic between regions during real peak periods and confirm that every tier holds. Capacity numbers on a spreadsheet often miss a pool size or a third-party quota.

Could autoscaling have saved region B?

Only partly. Five minutes is too short to double a fleet and warm it up, and every tier, including databases, would need to scale too. Autoscaling helps a stepped failover, not an instant one.

7Conclusion

In this answer, we saw that region B failed because moving all traffic doubled its 65 percent load to about 130 percent. Two active regions need normal peak below about 50 percent on every tier, including databases, caches, pools and third-party quotas. The failover should have shifted traffic in steps, considered a partial move because A was only partly failing, and used load shedding to keep most users served.

What to say in the interviewAbout 90 seconds aloud

Open with

Region B failed because it suddenly had to do twice its work. Each region was at about 65 percent CPU at peak, so moving all of A's traffic put B at roughly 130 percent of capacity.

Then, if they want more

It saturated, queues and latency grew, clients retried, and B went down too. The capacity rule for two active regions is that each must carry all traffic alone, so normal peak has to stay below about 50 percent, or the region must be able to grow before the traffic arrives.

That applies to every tier, not just app servers: databases, caches, connection pools, queues and third-party quotas in B all double as well. The procedure should also change.

Moving everything at once gives autoscaling, connection pools, JIT warm-up and caches no time to adapt, so I would shift in steps, 10, 25, 50 and 100 percent, watching errors, latency and saturation in B at each step and stopping if it degrades.

And A was only failing 30 percent of requests, so a partial move, or shedding low-priority work in A, might have served more people than a full move.

Finally, once B was overloaded, load shedding with fast 503s for low-priority traffic would have kept most users served at good latency instead of everyone timing out, which buys time to add capacity.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why did region B fail, and what should the capacity rule and the failover procedure have...": https://scrivio-interview-library.netlify.app/architecture/high-availability/cf47d3aa42/