sys0Early access
Back to your course

Part 1 · Foundations

Part 2 · Distributed systems

  1. Overview7 lessons · 115 min
  2. 1Sync, async and failoverRead
  3. 2Leader election and RaftRead
  4. 3Consistency modelsRead
  5. 4Leaderless and quorumsRead
  6. 5Conflict resolutionRead
  7. 6CAP and PACELCRead
  8. 7Lab: Choose consistency levelsLab

Part 3 · Under the hood

sys0Early access

Module 13 / Replication in depth / Overview

Module 13 7 lessons 115 min

Replication in depth

With read replicas in place, new problems appear: the primary fails during a write, two nodes both act as leader, and an order is missing from one read and back in the next.

In this module

6 Read · 1 Lab

  1. 13.1Sync, async and failoverWhat happens when the leader fails: lost writes, split brain and fencing.Read15 min
  2. 13.2Leader election and RaftHow nodes agree on a leader and a log, and why you use etcd or ZooKeeper instead of implementing it.Read18 min
  3. 13.3Consistency modelsRead-your-writes, monotonic reads, linearizability and eventual consistency, with examples from the app.Read15 min
  4. 13.4Leaderless and quorumsDynamo-style replication: R + W > N, and what it does and doesn't guarantee.Read15 min
  5. 13.5Conflict resolutionLast-write-wins, version vectors and CRDTs.Read12 min
  6. 13.6CAP and PACELCWhat CAP says and doesn't say, and the latency vs consistency tradeoff you make every day.Read10 min
  7. 13.7Lab: Choose consistency levelsMenu, cart, payment, rider location: choose a consistency level for each and justify it.Lab30 min
Start with 13.1 · Sync, async and failover
Then · Module 14Partitioning in depth