← Uber Interview Insights

Uber·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

System design round at Uber focused entirely on distributed consensus, specifically Paxos vs Raft. Pretty deep dive, felt more like a grad school oral exam than a typical eng interview.

Questions Asked (3)

Q1

Walk through how Paxos and Raft each achieve consensus over a replicated log. Compare their approaches to leader election, quorum requirements, log replication, membership changes, and behavior under network partitions.

System DesignTechnical Trade-offs
Author's notes

This is where I spent most of the interview and also where I fumbled the most.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the problem of consensus over a replicated log and the safety guarantees both protocols provide. Then systematically compare Paxos and Raft across the five dimensions, highlighting Raft's design for understandability and Paxos's theoretical foundations. Conclude with practical trade-offs and when each is preferred.

Pro tip: Emphasize that Raft was explicitly designed to be more understandable than Paxos, and mention real-world systems like etcd (Raft) and Chubby (Paxos) to show practical awareness. Also, note that Multi-Paxos is often used in practice but lacks a formal specification, which can lead to subtle bugs.

1. Define consensus and replicated log

Briefly explain that consensus ensures a set of nodes agree on a sequence of values (the log) despite failures. Mention safety (no two nodes commit different values at the same index) and liveness (eventual progress).

2. Compare leader election

Describe Paxos's leader election as a separate, often unspecified process (e.g., using a lease or bully algorithm), while Raft has a built-in randomized timeout mechanism with terms and voting.

3. Compare quorum and log replication

Explain that both use majority quorums, but Paxos allows any node to propose values (though a leader optimizes), while Raft strictly requires the leader to append entries and replicate them to followers.

4. Compare membership changes

Paxos typically uses a separate configuration management system or joint consensus, while Raft uses joint consensus with a two-phase approach to safely transition between configurations.

5. Compare behavior under network partitions

Both ensure safety by requiring majority quorums, so a minority partition cannot commit new entries. However, Raft's leader must be in the majority to commit, while Paxos may allow multiple leaders in different partitions, leading to potential conflicts resolved by quorum intersection.

Key Points to Mention

  • Paxos's original description is vague on leader election and log replication, leading to multiple variants (Multi-Paxos, Fast Paxos).
  • Raft's strong leader model simplifies log replication and makes it easier to reason about correctness.
  • Both protocols require a majority quorum for progress, ensuring safety under partitions.
  • Raft uses terms and randomized election timeouts to avoid split votes; Paxos often relies on external leader election.
  • Membership changes in Raft use joint consensus; Paxos often uses a separate configuration service or assumes static membership.
  • Real-world systems: etcd, Consul (Raft); Chubby, Spanner (Paxos).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Walk through specific failure scenarios: what happens when the leader crashes, when messages are delayed, or when a node loses its disk? How does the cluster recover in each case?

System DesignRoot Cause Analysis
Author's notes

Leader crash was easy, talked through election timeout and the new leader reconciling uncommitted entries.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first clarifying the system's architecture and assumptions (e.g., replicated state machine, consensus protocol like Raft/Paxos). Then, for each failure scenario, explain the detection mechanism, immediate impact, and recovery process, emphasizing how the system maintains consistency and availability. Conclude by discussing trade-offs and real-world considerations like Uber's scale.

Pro tip: Demonstrate maturity by acknowledging that perfect failure detection is impossible; instead, focus on how the system handles partial failures and ensures safety over liveness. Mention specific timeouts, quorum requirements, and idempotency to show depth.

1. Clarify System Model and Assumptions

State the assumed architecture: replicated log, leader election, consensus protocol (e.g., Raft), and failure models (crash-stop, network partitions). This sets the context for your analysis.

2. Analyze Leader Crash

Describe detection via heartbeats/timeouts, impact on writes (unavailable until new leader), and recovery through election (quorum-based) and log reconciliation. Mention split-brain prevention.

3. Analyze Message Delays

Explain how delays cause timeouts, retries, and potential duplicate messages. Discuss idempotency, deduplication, and how consensus protocols handle delayed messages (e.g., Raft's term numbers).

4. Analyze Node Disk Loss

Cover detection (e.g., failed writes, checksum errors), impact on replication factor, and recovery via re-replication from other replicas. Mention data durability guarantees and repair mechanisms.

5. Summarize Recovery and Trade-offs

Highlight common recovery principles (quorum, replication, idempotency) and trade-offs between consistency, availability, and latency. Relate to Uber's scale and reliability needs.

Key Points to Mention

  • Consensus protocol details: leader election, log replication, and quorum requirements (e.g., majority).
  • Failure detection mechanisms: heartbeats, timeouts, and their tuning for different network conditions.
  • Idempotency and deduplication to handle message delays and retries.
  • Replication and re-replication strategies for disk failures, including checksums and repair.
  • Split-brain prevention and consistency guarantees (e.g., linearizability).
  • Real-world considerations: monitoring, alerting, and automated recovery at scale.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Given that operational simplicity and debuggability are priorities, which would you choose for a new service, Paxos or Raft, and why?

Technical Trade-offsSystem Design
Author's notes

Picked Raft without much hesitation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that both Paxos and Raft solve consensus, but Raft was explicitly designed for understandability and operational simplicity. Then, connect this directly to the priorities by highlighting Raft's strong leader, clear log replication, and easier debugging, and conclude that Raft is the better choice for a new service at Uber.

Pro tip: Mention that many production systems (e.g., etcd, Consul, TiKV) use Raft, and that Uber itself uses Raft in some internal systems, showing practical awareness. Also, note that while Paxos is theoretically more general, Raft's design reduces the cognitive load on on-call engineers.

1. Clarify the decision criteria

Restate that the priorities are operational simplicity and debuggability, and that both algorithms provide consensus but differ in design philosophy.

2. Compare Paxos and Raft on those criteria

Explain that Paxos is notoriously difficult to understand and implement correctly, while Raft was designed with understandability as a primary goal, featuring a strong leader and clear log structure.

3. Highlight operational and debugging advantages of Raft

Discuss how Raft's leader election, log replication, and membership changes are easier to reason about, monitor, and debug, reducing operational overhead.

4. Acknowledge trade-offs and alternatives

Mention that Paxos may offer more flexibility in some scenarios, but for a new service prioritizing simplicity, Raft is the pragmatic choice.

5. Conclude with a clear recommendation

State that you would choose Raft, and briefly summarize why it aligns with the stated priorities.

Key Points to Mention

  • Raft's design goal of understandability vs. Paxos's theoretical complexity
  • Strong leader in Raft simplifies log replication and debugging
  • Operational simplicity: easier to implement, monitor, and maintain
  • Debuggability: clear state transitions and well-defined roles (leader, follower, candidate)
  • Real-world adoption: etcd, Consul, TiKV use Raft; Uber uses Raft in some systems
  • Trade-offs: Paxos may be more general but requires more expertise to operate

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.