Consensus and Coordination Algorithms Questions

How independent nodes agree on shared state: Paxos and Raft, leader election, quorum reads and writes, distributed locks, coordination services such as ZooKeeper or etcd, and Byzantine fault tolerance for replicas that cannot be trusted. 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
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.

HardTechnical
46 practiced

Provide a high-level client library interface (pseudo-code) for a distributed lock client with operations acquire(key, ttl), release(key), and renew(key, ttl) backed by a consensus store (e.g., etcd). Discuss failure modes (client crash, network partition), lease expiry, clock skew, and safe usage patterns you'd document for teams.

EasyTechnical
35 practiced

What is split-brain in the context of a replicated cluster? Describe typical causes, the consequences for correctness and availability, and how you would prevent or mitigate it in a production system.

MediumTechnical
37 practiced

Implement the Bully algorithm leader election in Python. Given a list of node IDs and a way to 'send' an election message to higher-ID nodes (synchronous, reliable for this exercise), write a function elect_leader(node_id, all_node_ids) -> leader_id that follows the Bully algorithm assumptions and returns the elected leader.

HardSystem Design
50 practiced

Across three active regions, build a booking coordination protocol that guarantees no double-booking of the same resource while keeping user-facing latency at p95 under 300ms. Weigh consensus (Paxos or Raft), partitioned ownership, optimistic concurrency with conflict resolution, and hybrid approaches against each other on latency, complexity, and availability.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.