Cap Theorem hard
When you request a Strong Consistent Read from DynamoDB, how does it fulfill the request?
- A The request is routed to the closest available replica node regardless of its current synchronization state.
- B The system initiates a global Paxos read phase that requires a unanimous vote from all regional nodes.
- C The request is routed to the Partition Leader, which returns data only if it is proven to be the most current version.
- D The system reads from all three replicas in the shard and performs a majority vote to determine the truth.
Answer: C. The request is routed to the Partition Leader, which returns data only if it is proven to be the most current version.
DynamoDB (and many similar cloud databases) uses Leader-routing to provide 'Strong Consistency' reads. By querying the Leader directly, you avoid the staleness of replicas. To ensure the Leader isn't 'Zombie' (partitioned but unaware), the system uses heartbeats or leases. This is more efficient than a Quorum Read (reading from N nodes), but it still requires a network hop to the shard's primary node.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is a 'Split Brain' scenario?
- The PACELC theorem extends CAP by stating: Even when there is NO partition (E), the system must choose between:
- Why is a CA (Consistent + Available) system generally considered impossible for distributed web applications?
- In CAP, 'Consistency' is equivalent to:
- In the CAP Theorem, what does the 'P' stand for?
- What causes a Network Partition?