System design

Architect

Untangle the distributed monolith

Three teams own the catalog, cart and reviews services of a fashion store, but the three services still share one database. At 10:00 the reviews team runs a migration that locks that database for an hour, and today that takes the whole store down. The new rule: one team's change must never take down another team's feature. Reviews may vanish from pages during their incident; browsing and checkout may not.

The storefront calls all three services for every page. The shared database becomes the reviews database: the migration will run on it whatever you do. Fallback answers are counted: the reviews block alone will need about 14 million of them during that hour, and no other team may use any.

What your design must achieve

  • Availability ≥ 99.9 %
  • Requests answered with a fallback < 20000000
  • Latency p99 < 300 ms

What you will master