Review cards · 16 cards
Coordination
Leader election, consensus, locks and fencing, distributed transactions, sagas and logical clocks.
Cards
- How many nodes does a consensus cluster (Raft, ZooKeeper) need to keep working with any 3 of them down?
- 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 _____.
- How does a Lamport clock work, and what can it not tell you?
- Why does a leader hold a lease that expires (say after 10 s) rather than a lock it keeps until it releases it?
- A 5-node etcd cluster spans three availability zones. Which placement keeps it writable when any one zone goes down?
- 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 _____.
- Raft and Paxos solve the same problem. What is the main reason Raft became the common choice in new systems (etcd, Consul, CockroachDB)?
- Saga orchestration or choreography: what does each trade?
- What are ZooKeeper and etcd good for, and what should you not store in them?
- 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?
- 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?
- 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?
- In Raft, why can a node that missed recent committed entries not become the leader?
- Redlock takes a lock on a majority of several independent Redis servers. Why is it debated whether it is safe?
- In two-phase commit, every participant voted yes, then the coordinator crashed before sending its decision to anyone. What may a participant do?
- Two versions of a key carry the vector clocks {A: 2, B: 1} and {A: 1, B: 2}. How are they related?
More topics
- Estimation 21 cards
- Networking 16 cards
- API design 17 cards
- Caching 21 cards
- Databases 22 cards
- Replication 15 cards
- Sharding 18 cards
- Consistency 19 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