Review cards · 16 cards

Coordination

Leader election, consensus, locks and fencing, distributed transactions, sagas and logical clocks.

Train coordination in daily review

Cards

  1. How many nodes does a consensus cluster (Raft, ZooKeeper) need to keep working with any 3 of them down? easy Estimate
  2. ZooKeeper deletes an _____ znode automatically when the session of the client that created it ends, which makes it a natural way to track live members or hold a lock. etcd does the same with keys attached to a _____. medium Fill in the blank
  3. How does a Lamport clock work, and what can it not tell you? medium Flashcard
  4. Why does a leader hold a lease that expires (say after 10 s) rather than a lock it keeps until it releases it? medium Flashcard
  5. A 5-node etcd cluster spans three availability zones. Which placement keeps it writable when any one zone goes down? medium Multiple choice
  6. Raft followers wait a _____ election timeout (for example 150–300 ms) without hearing from a leader before starting an election, so that usually one node times out first and wins before the others try, which avoids repeated _____. medium Fill in the blank
  7. Raft and Paxos solve the same problem. What is the main reason Raft became the common choice in new systems (etcd, Consul, CockroachDB)? medium Multiple choice
  8. Saga orchestration or choreography: what does each trade? medium Flashcard
  9. What are ZooKeeper and etcd good for, and what should you not store in them? medium Flashcard
  10. A lock holder freezes in a long GC pause, its lease expires, another client takes the lock, then the first one wakes up and writes. How do **fencing tokens** stop the damage? hard Flashcard
  11. A consumer calls the payment provider to charge a card, then writes the message id to a "processed" table, then acknowledges. It crashes after the charge. What happens, and what fixes it? hard Multiple choice
  12. A 3-node Raft group has its leader in US East and followers in US West (70 ms round trip from the leader) and Europe (80 ms). About how long does the leader take to commit a write? hard Estimate
  13. In Raft, why can a node that missed recent committed entries not become the leader? hard Multiple choice
  14. Redlock takes a lock on a majority of several independent Redis servers. Why is it debated whether it is safe? hard Flashcard
  15. In two-phase commit, every participant voted yes, then the coordinator crashed before sending its decision to anyone. What may a participant do? hard Multiple choice
  16. Two versions of a key carry the vector clocks {A: 2, B: 1} and {A: 1, B: 2}. How are they related? hard Multiple choice

More topics