Review cards · 19 cards

Consistency

CAP, quorums, isolation levels and the guarantees a reader can count on.

Train consistency in daily review

Cards

  1. A Raft cluster has 5 nodes. How many can fail while it still commits writes? easy Multiple choice
  2. When is eventual consistency good enough, and when is it not? easy Flashcard
  3. What does the CAP theorem actually force you to choose, and when? medium Flashcard
  4. 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 _____. medium Fill in the blank
  5. What does linearizability promise that eventual consistency does not, and what does it cost? medium Flashcard
  6. A shopping cart must accept "add item" even during a network partition or when a database node is down. Which design fits? medium Multiple choice
  7. 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? medium Multiple choice
  8. How does Raft commit a write? medium Flashcard
  9. 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. medium Fill in the blank
  10. 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? medium Multiple choice
  11. A service must save an order and publish an "order created" event, and never do one without the other. How? medium Multiple choice
  12. 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. medium Fill in the blank
  13. In a comment thread, a reader sees a reply before the question it answers. What is the weakest guarantee that rules this out? hard Multiple choice
  14. Why do consensus clusters (etcd, ZooKeeper) use 3 or 5 nodes rather than 4? hard Multiple choice
  15. 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? hard Estimate
  16. What does a saga give up compared with one ACID transaction? hard Flashcard
  17. What is a sloppy quorum with hinted handoff, and what does it cost? hard Flashcard
  18. What is the main weakness of two-phase commit (2PC)? hard Flashcard
  19. What can version vectors (vector clocks) tell you that timestamps cannot? hard Flashcard

More topics