InterviewStack.io LogoInterviewStack.io

Consensus and Coordination Algorithms Questions

How independent nodes agree on shared state: Paxos and Raft, leader election, quorum reads and writes, distributed locks, and coordination services such as ZooKeeper or etcd. Covers split-brain avoidance, fencing tokens, and the cost of coordination on throughput and latency. Frames when consensus is required versus when it can be designed away.

MediumSystem Design
49 practiced

Design a follower-reads optimization for a strongly-consistent key-value system that allows slightly stale reads from followers while guaranteeing clients can request fresher data when needed. Describe API semantics, staleness bounds, and how you would ensure monotonic reads and session guarantees.

HardTechnical
38 practiced

Design a leader-election mechanism for coordinating scheduled jobs across many instances in a data-center environment prone to network partitions. Compare lease-based approaches (e.g., Zookeeper/etcd TTL leases) with consensus algorithms (Raft/Paxos), and explain how you would handle split-brain and safe failover.

MediumSystem Design
44 practiced

Design a lease-based leadership mechanism that allows followers to serve local linearizable reads without contacting the leader on every read. Describe how you would handle clock skew, lease renewal, and leader transfer. State assumptions about clock drift or synchronize time service as needed.

MediumTechnical
37 practiced

Explain the two-phase commit (2PC) protocol and contrast it with distributed consensus solutions for coordinating commits across services. When is 2PC sufficient and when should you prefer consensus or compensating transactions?

HardSystem Design
41 practiced

Design a distributed locking service to coordinate exclusive access to logical resources among 10k concurrent clients. Describe lock acquisition/renewal, TTLs, failure detection, fairness, and approaches to avoid stale locks or deadlocks. Discuss trade-offs of using a consensus-based store (e.g., etcd) vs a centralized lock server.

Unlock Full Question Bank

Get access to all Consensus and Coordination Algorithms interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.