InterviewStack.io LogoInterviewStack.io

Distributed Systems and Consensus Algorithms Questions

Covers the fundamentals and practical application of distributed systems and the algorithms that produce agreement across nodes. Topics include consistency models such as strong consistency, eventual consistency, and causal consistency; replication strategies including master slave and peer to peer; and distributed transactions. Explain consensus algorithms and their trade offs, for example Raft, Paxos, and Practical Byzantine Fault Tolerance, including safety and liveness properties, quorum based decision making, leader election patterns, leader based versus leaderless designs, log replication, heartbeats, and lease based leadership. Understand the theorem that trades off consistency, availability, and partition tolerance and its implications for system design. Be able to reason about failure modes such as network partitions, split brain, and Byzantine faults and how algorithms and system choices mitigate them. Include familiarity with real world systems that implement these concepts such as Etcd, Consul, ZooKeeper, DynamoDB, and HBase. At senior and staff levels, demonstrate when consensus is required versus when it can be avoided, the operational complexity and performance costs of consensus, practical engineering decisions for scaling and fault tolerance, debugging and testing strategies, and how these choices affect application behavior.

MediumTechnical
37 practiced
For classic Paxos, describe the message complexity (number of messages and rounds) required for a single simulated consensus decision (single value) in the typical leader-based optimization (multi-Paxos) and compare it to Raft's AppendEntries for a batched set of commands. Discuss the effect of batching on throughput and latency.
MediumSystem Design
37 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
34 practiced
Design a chaos engineering test suite for a consensus cluster (e.g., a 5-node Raft cluster). Include fault injection scenarios (network partitions, message loss, delayed messages, disk stalls, process pauses), metrics to capture, automated checks to detect correctness regressions, and acceptance criteria for cluster resilience.
EasyTechnical
33 practiced
When would you choose optimistic concurrency control (e.g., CAS / version compare) versus pessimistic locking in a distributed service? Give examples of workloads and trade-offs including throughput, latency, user experience, and complexity.
MediumTechnical
26 practiced
You see an etcd cluster with repeated leader changes every few seconds, causing client errors. Given access to metrics (election timeout, RPC latencies, disk stalls, GC pauses) and logs, outline a debugging plan to identify root cause(s) and propose immediate mitigations to stabilize the cluster.

Unlock Full Question Bank

Get access to hundreds of Distributed Systems and Consensus Algorithms interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.