Sub topic 12
Failure modes: regional outages, partial failures and split brain
This chapter assumes you know DNS-based routing, health checks, and asynchronous cross-region replication. It covers how an active-active system fails, and what each failure does to your data and traffic.
Three kinds of failure
Active-active designs handle clean failures well. The harder cases are the ones where a region is neither up nor down.
| Failure | What you see | Typical risk |
|---|---|---|
| Regional outage | A whole region stops answering | Lost unreplicated writes, overload in the survivors |
| Partial failure | One dependency or availability zone degrades | Health checks pass while users get errors |
| Network partition | Regions are both running but cannot reach each other | Split brain and divergent data |
Regional outages
When a region fails, health checks remove it from routing and the other regions take its traffic. Two things go wrong in practice.
- Replication lag becomes data loss. Asynchronous replication means the failed region may hold writes that never left it. Your RPO is the lag at the moment of failure.
- Survivors get overloaded. If each of three regions runs at 70% load, losing one pushes the others to about 105%. Capacity planning has to cover this case.
Cached DNS answers also keep some clients pointed at the dead region until the TTL expires. A short TTL, such as the 60 seconds in the Route 53 example, limits that window but does not remove it.
Partial failures
A region can be unhealthy without being down. Examples are a database with high latency, a failing downstream API, or one degraded availability zone. A shallow health check that only tests "does the load balancer answer" will report healthy.
Prefer health checks that exercise a critical dependency, but keep them cheap. A check that fails whenever any optional dependency fails can take every region out at once, which turns a minor fault into a global outage.
Split brain
Split brain happens when a network partition separates regions that both stay healthy. Each region keeps accepting writes, and neither knows about the other's changes.
You have three main responses, and each costs something.
- Resolve conflicts after the fact. Use last-writer-wins or a CRDT. Availability stays high, but last-writer-wins silently drops one write.
- Restrict writes. Give each record a home region (write ownership). During a partition, only the owner accepts writes for that record.
- Require a quorum. Accept writes only in the side holding a majority of replicas. The minority side becomes read-only or unavailable. This protects consistency at the cost of availability, as CAP predicts.
Choose per data type. A counter can use a CRDT, a user profile can use write ownership, and a payment ledger usually needs a quorum.
Failback and retries
Recovery causes its own failures. When a region returns, it may hold stale data or writes not yet replicated. Let it catch up and pass checks before it takes full traffic, and shift traffic back gradually. Clients that retried during the outage may resend requests, so operations need idempotency keys.
Exercise
Three regions each run at 80% of capacity. One region fails and its traffic splits evenly between the other two. What load does each survivor carry, and what does this tell you about sizing?
Show answer
Each survivor takes half of the failed region's 80%, so each rises from 80% to 120% of capacity. They are overloaded. To survive the loss of one region out of three, each region must run at no more than about 66% of capacity in normal operation, which leaves room for 50% extra traffic.