Multi-Region Network Partition
Both regions believe they should accept writes after a network split.
Topic tools
Layout updated
Prompt
Both regions believe they should accept writes after a network split.
A is a time-limited permission slip. A disconnected former owner may still be alive, so the resource must reject its old slip.
Constraints
- Keep only one authorized writer during a network split.
- Do not resume old-region writes without checking its state.
Think first
Take five minutes to state the failure, the evidence you need and your first safe move.
Staged reveal
First move
A grants a new ownership number and storage checks it on writes.
What to check
Watch reachability, expiry and epochs presented at storage.
Recovery
Let the minority stop writes; the surviving authority issues a higher and the protected resource rejects old owners even if they are still running.
What you give up
Synchronous remote agreement adds latency. Asynchronous replicas may miss recent accepted writes, so safe promotion can require waiting or .
Architecture and technical reference
High-level design
- Edge
- Compute
━━ Synchronous┄┄ Asynchronous···· Recovery / control▧ Fault
Each arrow is one interaction. Request, background and recovery branches are not one linear transaction.
Read the 5 flow steps
Problem statement
A region becomes unreachable, but its old writer may still be running. How does a second region safely take over?
Functional requirements
- Choose which region may accept writes.
- Reject writes from the previous owner.
- Recover the returning region before it rejoins.
Non-functional requirements
- Keep only one authorized writer during a network split.
- Do not resume old-region writes without checking its state.
Entities
| Entity / logical owner |
|---|
| Authoritative state |
API design
| Operation / input | Response and retry contract |
|---|---|
Decision contract | Identify acceptance, retry identity, version/ and the response on uncertainty. |
High-level design component walkthrough
Clients
Write requests
Why, tradeoff and connected operations
An application or user-facing endpoint starts or receives this flow.
Tradeoff: Minority-side writes may be rejected
Connected operations: Route write request
Quorum / Lease Authority
Issue ; elect owner
Why, tradeoff and connected operations
Make ownership/version changes explicit; downstream resources must reject stale owners.
Tradeoff: Availability loss without majority
Connected operations: majority promotion; Publish authorized
Current Region Leader
May be isolated
Why, tradeoff and connected operations
Isolate this operation so it can scale and fail independently from storage.
Tradeoff: Old leader may keep serving stale
Connected operations: old
Epoch Validation
Reject stale old-leader writes
Why, tradeoff and connected operations
Make ownership/version changes explicit; downstream resources must reject stale owners.
Tradeoff: Every write must validate
Connected operations: old ; Validate current ; Publish authorized
Surviving Majority
New authorized writer
Why, tradeoff and connected operations
Isolate this operation so it can scale and fail independently from storage.
Tradeoff: Promotion adds temporary downtime
Connected operations: Route write request; majority promotion; Validate current
Engineering control room
Deep dives — decisions, failures and recovery
Open a deep dive to follow the steps, try an example and see how recovery works.
Tradeoffs and alternatives
| Decision | Tradeoff / alternative and recovery implication |
|---|---|
| Reject the previous regional writer | Synchronous remote agreement adds latency. Asynchronous replicas may miss recent accepted writes, so safe promotion can require waiting or . |
| Recover the accepted history before reopening writes | The returning region must reconcile or rebuild before rejoining. Its cached and private updates are evidence to examine, not permission to resume writes. |
| What happens if a region fails? | Strict single-authority safety pauses minority writes; accepting both sides would require a different conflict-resolution contract. |
| Retry identity and ambiguous commands | Durable duplicate-result history adds state; accepting fresh identities during ambiguous recovery increases the risk of repeated actions. |
Production scars & failure modes
Both regions believe they should accept writes after a network split.
Look for: Watch reachability, expiry and epochs presented at storage.
Recovery and invariant: Let the minority stop writes; the surviving authority issues a higher and the protected resource rejects old owners even if they are still running.
| Component / failure | Impact | Recovery mechanism | Alternative / tradeoff |
|---|---|---|---|
| Primary failure / race | A region becomes unreachable, but its old writer may still be running. How does a second region safely take over? | Promote only from a safe committed prefix, fence the old writer and route new requests to the authorized owner. The minority stops writes. | Async replication has nonzero ; a health check cannot prove the old writer is dead. Zero-loss recovery may require WAN latency. |
| Recovery follow-up | The old region returns with unreplicated updates and a cached . Explain and rejoin. | Promote only from a safe committed prefix, fence the old writer and route new requests to the authorized owner. The minority stops writes. | State the guarantee you relax and how you detect recovery. |
90-second interview summary
For a multi-region network partition, I would begin by choosing the safety contract. This design keeps one write authority, so the side that cannot establish valid ownership stops accepting protected writes instead of becoming an independent primary.
A -backed service grants an increasing ownership . The protected database or effect boundary remembers the highest allowed and rejects stale ones. A timeout at the coordinator alone is insufficient: an old process may pause, lose contact and later resume while still reaching storage.
Promotion recovers a safe committed history, establishes the new , fences the old writer and then changes routing. Client requests preserve their logical identity because one valid owner at a time does not prevent the same uncertain command from being retried across two successive owners.
When the partition heals, the old region rejoins through or reseeding. Its cached and unreplicated updates remain evidence to resolve, not permission to resume writes. I would monitor ownership changes, stale- rejection and uncertain command age. The tradeoff is reduced minority availability and possible promotion delay in exchange for avoiding split ownership; accepting writes on both sides would require a different conflict-resolution model.
Explain it without looking
Explain reject the previous regional writer
Reveal answer
A grants a new ownership number and storage checks it on writes.
A failed health check cannot prove the old writer is dead; it may still reach the database.
Synchronous remote agreement adds latency. Asynchronous replicas may miss recent accepted writes, so safe promotion can require waiting or .
Explain recover the accepted history before reopening writes
Reveal answer
Choose a safe recovered state, stop old-owner writes and preserve request identities.
Changing a routing address does not resolve an in-flight command whose response was lost.
The returning region must reconcile or rebuild before rejoining. Its cached and private updates are evidence to examine, not permission to resume writes.
Explain what happens if a region fails?
Reveal answer
Stop the returning old owner from resuming writes with an expired .
The end of a network outage is not the end of the ownership recovery protocol.
Strict single-authority safety pauses minority writes; accepting both sides would require a different conflict-resolution contract.
Explain retry identity and ambiguous commands
Reveal answer
Ownership and duplicate-command protection solve different problems.
One current writer does not automatically imply one business effect per client intent.
Durable duplicate-result history adds state; accepting fresh identities during ambiguous recovery increases the risk of repeated actions.
Revision checklist
Revision checklist
- Reconstruct reject the previous regional writer: A grants a new ownership number and storage checks it on writes.
- Reconstruct recover the accepted history before reopening writes: Choose a safe recovered state, stop old-owner writes and preserve request identities.
- Reconstruct what happens if a region fails?: Stop the returning old owner from resuming writes with an expired .
- Reconstruct retry identity and ambiguous commands: Ownership and duplicate-command protection solve different problems.
- Name the authoritative state, boundary, retry identity and failure-domain durability guarantee.
- Explain one alternative and exactly which guarantee you would relax.
- Redraw the request and recovery paths without looking; mark what required a hint.
On this page
- Prompt
- Constraints
- Think first
- Staged reveal
- High-level design
- Problem statement
- Functional requirements
- Non-functional requirements
- Entities
- API design
- High-level design component walkthrough
- Engineering control room
- Deep dives — decisions, failures and recovery
- Tradeoffs and alternatives
- Production scars & failure modes
- 90-second interview summary
- Explain it without looking
- Revision checklist