FDEBench Join us live

Q
151 / 159

General design

Users in Sydney are waiting on a write round trip to a primary database in Virginia, and a Virginia outage blocks writes globally. Design a fix and tell me what new problem you have created.

question bank FDEBench bank

01
Sketch

Reference sketch

A short answer key carried over from the source. Not yet a graded rubric.

1. Name the cause: a single-leader topology means every write pays the round trip to one region and the leader is a global write availability single point of failure. 2. Propose multi-leader (or leaderless) replication with a leader per region accepting local writes and replicating asynchronously to the others. 3. State the cost immediately: concurrent writes to the same row in different regions both succeed, so the system now has write conflicts it did not have before. 4. Enumerate conflict-resolution options and their honest tradeoffs — last-write-wins by timestamp is simple and silently discards data; per-field merge preserves more; CRDTs converge without loss for the data types they support; application-level merge is correct but expensive to build. 5. Note that timestamp-based resolution depends on clock skew, so bounded clocks or logical clocks matter. 6. Reduce conflicts structurally rather than resolving them: partition ownership so a given record is normally only written in one region (home-region routing). 7. Decide per data class: a shopping cart can merge, a bank balance cannot, an account setting can take last-write-wins.

—