Distributed Computing Mid
Explain the Two Generals Problem. Why can two nodes never be 100% certain they have reached a common agreement over an unreliable network?
Select the correct answer
What is the difference between synchronous and asynchronous communication models in distributed systems, and what are the trade-offs?
Select the correct answer
Why do stateless services scale more easily than stateful ones, and how do we handle state when scaling horizontally?
Select the correct answer
Explain 'Read-Your-Writes' consistency. How would you implement it in a system with asynchronous replication?
Select the correct answer
Explain the trade-off between Latency and Consistency in a system that is not currently experiencing a network partition.
Select the correct answer
What is the difference between Linearizability and Eventual Consistency? When is Eventual Consistency 'not enough'?
Select the correct answer
What are monotonic reads and monotonic writes consistency, and what anomalies do they prevent?
Select the correct answer
Explain the CAP theorem. In a real-world network partition, why is it technically impossible to choose both Consistency and Availability? Can you give an example of a 'CP' vs. an 'AP' system?
Select the correct answer
What is a 'Quorum' in a distributed system, and how do the values of N, R, and W affect consistency and availability?
Select the correct answer
Explain the relationship R + W > N. If I want to increase read throughput in a distributed database, how should I tune these variables, and what is the trade-off regarding consistency?
Select the correct answer
R + W ≤ N you can lose the strong-consistency guarantee.Why is 'Partition Tolerance' generally considered non-negotiable in distributed systems?
Select the correct answer
What is the Byzantine Generals Problem, and how does it differ from a simple 'fail-stop' or 'crash' failure? When would a software engineer actually need to care about Byzantine Fault Tolerance (BFT)?
Select the correct answer
What is graceful degradation, and how does a distributed system stay partially functional when components fail?
Select the correct answer
Explain how Consistent Hashing works. How does it minimize data movement when a node is added or removed compared to a simple hash(key) mod N approach?
Select the correct answer
mod N, adding a node remaps only one key while consistent hashing remaps every key evenlyWhat are Virtual Nodes in consistent hashing, and what problem do they solve regarding data distribution?
Select the correct answer
What are the trade-offs between synchronous and asynchronous replication? If you choose 'Semi-synchronous' replication, what failure scenario are you trying to protect against?
Select the correct answer
Explain the difference between Leader-based, Multi-leader, and Leaderless replication.
Select the correct answer
What is the difference between Range Partitioning and Hash Partitioning, and what are the tradeoffs regarding range queries vs. load balancing?
Select the correct answer
What is data rebalancing when partitions are added or removed, and what strategies avoid moving too much data at once?
Select the correct answer
How does a request get routed to the correct partition or shard, and what are the trade-offs between different routing approaches?
Select the correct answer
What is a Lamport Clock, and how does it differ from a Vector Clock? What specific problem do Vector Clocks solve that Lamport Clocks cannot?
Select the correct answer
Explain the 'Happens-Before' relationship. How do we determine if two events are concurrent?
Select the correct answer
Why can't we rely on physical system clocks (NTP) for ordering events in a distributed system? What is 'clock skew' and how does it affect distributed logs?
Select the correct answer
What is a Lamport Clock, and how does it allow us to determine the partial ordering of events without a synchronized physical clock?
Select the correct answer
What is Last-Write-Wins (LWW), and why is it dangerous in systems where physical clocks are not perfectly synchronized?
Select the correct answer
Explain the concept of 'Clock Skew' and its impact on distributed transaction ordering.
Select the correct answer
Explain how a Lamport Clock works. If two events have the same Lamport timestamp, can we determine which one happened first? Why or why not?
Select the correct answer
How do Vector Clocks allow us to detect 'causal' relationships between events? In what scenario would a Vector Clock show that two writes are 'concurrent' or 'conflicting'?
Select the correct answer
What is 'Replication Lag,' and what specific anomalies can a user see because of it? How would you design a system to prevent a user from seeing their own update disappear after a refresh?
Select the correct answer
What are the practical risks of Eventual Consistency? How do concepts like 'Read-your-writes' or 'Monotonic Reads' help mitigate the poor user experience of eventual consistency?
Select the correct answer
What are the trade-offs of Eventual Consistency, and how does a system eventually converge if multiple nodes receive conflicting updates?
Select the correct answer
Explain the high-level roles in the Raft consensus algorithm (Leader, Follower, Candidate). How does the system ensure that two leaders are never elected for the same term?
Select the correct answer
What is 'Leader Election', and what happens to a distributed system when the leader becomes partitioned from the followers?
Select the correct answer
How do heartbeats and election timeouts work together in a consensus protocol? What happens if the election timeout is set too low or too high?
Select the correct answer
What are the different message ordering guarantees, FIFO, causal, and total order, and when does each matter?
Select the correct answer
Why is Idempotency critical in distributed systems, and how would you design an idempotent API?
Select the correct answer
Explain the Two-Phase Commit (2PC) protocol. What is its biggest blocking weakness if the coordinator fails?
Select the correct answer
What is the Saga pattern, and how does it maintain data consistency without using a distributed lock?
Select the correct answer
Explain the difference between 'At-least-once', 'At-most-once', and 'Exactly-once' delivery guarantees.
Select the correct answer
What is the Transactional Outbox pattern, and how does it solve the problem of atomically updating a database and sending a message to another system?
Select the correct answer
Explain the Gossip (Epidemic) Protocol. How does it allow a cluster of thousands of nodes to maintain a membership list without a central registry?
Select the correct answer
What is the 'Split Brain' problem, and how do quorums and fencing tokens prevent it?
Select the correct answer
What is failover, and how does a system detect failure and promote a standby without causing inconsistency?
Select the correct answer
What is service discovery, and why is it a coordination problem in dynamic distributed systems?
Select the correct answer
What is the coordinator/worker (master/worker) pattern, and what are the risks of having a single coordinator?
Select the correct answer
Explain the 'Thundering Herd' problem. How do jitter and exponential backoff help mitigate it?
Select the correct answer
Explain the MapReduce execution model. Why is 'Data Locality' a core principle of its design?
Select the correct answer
Explain 'Backpressure'. Why is it critical for a downstream service to signal its inability to keep up with requests?
Select the correct answer
What is a distributed file system like GFS or HDFS at a conceptual level, and how does it achieve fault tolerance for large data?
Select the correct answer
Why do retries in a distributed system need backoff and jitter, and how can naive retries make an outage worse?
Select the correct answer