System design

Advanced

A replica set that survives a zone

Orders live in a three-member document database. At 09:00 the primary will crash, and at 13:00 zone A will go dark for an hour. Keep taking orders and never lose an acknowledged one.

A replica set needs a majority of members to elect a primary and accept writes. Every minute is simulated.

What your design must achieve

  • Availability ≥ 99.9 %
  • Lost writes = 0
  • Latency p99 < 120 ms

What you will master