Episode 9. Distributed theory. Day 9. The Principal filter. This episode decides senior versus Principal. Key facts. CAP: under a network partition, choose consistency or availability. PACELC extends it: without partitions, choose latency or consistency. Quorum: with replication factor N, writes of W and reads of R are strongly consistent when R plus W exceeds N. Aurora uses six copies, write quorum four, read quorum three. Say this sentence: R plus W greater than N is the whole game. Say it again until it is automatic. Paxos and Raft in one minute. Paxos: proposers, acceptors, learners agree on one value through prepare and accept phases. Hard to implement, proven in theory. Raft: elect a leader, replicate the log, commit on majority, followers elect a new leader on timeout. Say: Raft is Paxos made operable through leader election and log replication. Scenario 1. Design a multi Region order system that never loses a write and stays up when a Region fails. Talk first. Understand. Ask: what does never lose mean: zero RPO or bounded? Read latency budget per Region? Write conflict rate: can two Regions write the same order? Compliance constraints on data placement? Prepare. Say the data in order. RPO and RTO targets. Read versus write ratio. Conflict semantics per entity. Region latency matrix. Failure domains: AZ versus Region. Say your translation line: Same instinct as Data Guard versus RAC: synchrony buys durability and costs latency. Identify. Commit. Say: my recommendation is DSQL style active active with strong consistency for conflicting entities, async replication for non conflicting reference data, and idempotency keys on every write. Defend the tradeoff: cross Region commit latency in exchange for zero lost writes. Name the alternative and why it loses. Support. Success: measured RPO of zero on Region kill drills, RTO inside target, conflict rate tracked, and quarterly partition drills. Scenario 2: why quorum reads cost more. Say: I'd explain that quorum writes spread cost at write time so reads stay fast and consistent, and that leader based protocols serialize through one node while quorum protocols parallelize. Then close with the formula. Your Day 9 lab: on paper, pick N equals five, choose R and W for strong consistency, then for low latency reads. Write the failure case each choice breaks under. Say the formula out loud ten times. R plus W greater than N. Tomorrow, Episode 10: full scenarios. Four timed mocks, end to end. Understand. Prepare. Identify. Support.