# Mixed Self-Check — Distributed Systems & Consensus (Raft / Paxos)

Source: https://www.skillbyai.com/en/distributed-consensus/dc-self-check

> Test yourself across clocks, quorums, Paxos, Raft and production practice, and find the topics to revisit.

## How to use this self-check

Before attempting the final question, answer each prompt below in your own words without looking back, then check the matching topic. **Clocks**: why can last-writer-wins lose a write? **Quorums**: with N = 7, what is the smallest W that overlaps R = 3? **Paxos**: what does an acceptor promise, and what does it report back? **Raft election**: what two conditions must hold before a server grants its vote? **Raft log**: what does the AppendEntries consistency check compare? **Commit**: when is an entry committed, and why does a new leader write a no-op? **Practice**: how does Pre-Vote differ from a normal election, and where must a fencing token be checked? If any answer took more than a minute, revisit that topic, then explain it to a friend. Teaching it aloud is the fastest way to discover which step you only half understand.

## Quick answers to check yourself

W = 5 (since 5 + 3 > 7). An acceptor promises to ignore lower ballots and reports its highest accepted ballot and value. A voter needs: not yet voted for another candidate this term, and the candidate's log at least as up-to-date. AppendEntries compares the term at prevLogIndex.

## Nets practice before the match

A batter does not just read about cover drives; they face bowling in the nets until the shot is automatic. Re-solving these prompts a few days apart is your net practice for interviews.

**Quiz:** A Raft cluster of 5 is split 3 | 2 by a partition, and the old leader is on the 2-node side. What happens?

- [ ] Both sides keep committing writes and merge later
- [x] The 3-node side elects a new leader and commits; the old leader cannot commit anything
- [ ] The whole cluster stops until the partition heals
- [ ] The 2-node side keeps the leader because leaders never change during partitions

*Answer:* The 3-node side elects a new leader and commits; the old leader cannot commit anything. Only the side with a majority can elect a leader and commit. The isolated old leader cannot reach a quorum, so its writes never commit, and it steps down when it sees the higher term.
