All Questions
Sharding hard

In a globally sharded system, if a network submarine cable is cut, isolating the US shards from the EU shards, and you must continue allowing both US and EU users to update their profiles, what must you sacrifice according to the CAP Theorem?

  1. A Availability: Both shards must go into read-only mode until the network link is physically restored.
  2. B Partition Tolerance: The system must be able to prevent the physical network cable from being cut in the first place.
  3. C Consistency (Linearizability): Users will successfully update their data, but the two regions will drift apart (Split-Brain), meaning they will not see each other's updates until the network is healed.
  4. D Storage Capacity: The shards must delete old data to make room for the extra metadata needed to track the network partition.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions