Review cards · 19 cards
Consistency
CAP, quorums, isolation levels and the guarantees a reader can count on.
Cards
- A Raft cluster has 5 nodes. How many can fail while it still commits writes?
- When is eventual consistency good enough, and when is it not?
- What does the CAP theorem actually force you to choose, and when?
- Data types such as grow-only counters and add-wins sets, which merge concurrent updates from different replicas automatically and always converge to the same value, are called _____.
- What does linearizability promise that eventual consistency does not, and what does it cost?
- A shopping cart must accept "add item" even during a network partition or when a database node is down. Which design fits?
- A key is stored on N = 3 replicas, and writes wait for W = 2 of them. How many replicas must a read ask (R) to be sure it sees the latest write?
- How does Raft commit a write?
- Each Raft election starts a new _____. A node votes for at most one candidate per term, so at most one _____ can be elected in it.
- Placing an order spans the payment, inventory and shipping services, each with its own database and team. What is the usual way to keep them consistent?
- A service must save an order and publish an "order created" event, and never do one without the other. How?
- Making sure two people cannot register the same username at the same moment needs a _____ operation, such as a unique constraint or a compare-and-set.
- In a comment thread, a reader sees a reply before the question it answers. What is the weakest guarantee that rules this out?
- Why do consensus clusters (etcd, ZooKeeper) use 3 or 5 nodes rather than 4?
- A store with N = 3 sends each write to all 3 replicas and each read to 2 replicas (R = 2). Clients make 10,000 writes/s and 30,000 reads/s. How many operations per second do the replicas handle in total?
- What does a saga give up compared with one ACID transaction?
- What is a sloppy quorum with hinted handoff, and what does it cost?
- What is the main weakness of two-phase commit (2PC)?
- What can version vectors (vector clocks) tell you that timestamps cannot?
More topics
- Estimation 21 cards
- Networking 16 cards
- API design 17 cards
- Caching 21 cards
- Databases 22 cards
- Replication 15 cards
- Sharding 18 cards
- Queues 18 cards
- Streaming 18 cards
- Availability 14 cards
- Resilience 16 cards
- Storage 14 cards
- Realtime 15 cards
- Data structures 16 cards
- Security 17 cards
- Observability 18 cards
- Coordination 16 cards