internalsGet Pro

System Design · Module 10

Consensus, coordination and distributed transactions

Lessons
12
Free
0
Reading
~4 h

Your progress

0 / 12 lessons done

Sign in to track

Lessons

  1. Consensus: getting nodes to agree on a valueReplicated databases and coordination services must preserve decisions when machines fail. Understanding consensus helps you evaluate their guarantees, failure behavior and operating costs.19 min
  2. Raft: a consensus algorithm step by stepRaft appears inside databases and coordination systems. Understanding its boundaries helps you diagnose unavailable writes, stale reads and unsafe failover assumptions.20 min
  3. Leader election: choosing a single coordinatorBackground schedulers and maintenance jobs often need one coordinator with automatic replacement. The difficult part is replacing that coordinator without trusting a paused or disconnected worker.19 min
  4. Distributed locks and leasesBackground workers often need exclusive access to shared resources. Understanding leases helps you recover from crashes without assuming that an expired worker has stopped.19 min
  5. Fencing tokens: protecting against stale lock holdersBackground workers can resume after losing a lease. Fencing lets a database or service reject their delayed writes instead of trusting the worker’s view of ownership.19 min
  6. ZooKeeper and etcd: coordination servicesSchedulers, service discovery and configuration distribution need a shared authority. Coordination services provide that authority, but applications must still handle stale clients, interrupted watches and ambiguous results.19 min
  7. Two-phase commit: atomic transactions across servicesA checkout can update several databases but still need one outcome. Two-phase commit explains both how that outcome is protected and why a failed coordinator can leave healthy databases waiting.20 min
  8. Sagas: multi-step transactions with rollback stepsCheckout often changes several independently owned systems. Sagas make partial completion explicit and give engineers a recovery plan when one step fails.19 min
  9. Transactional outbox: reliably publishing eventsAn order can be saved successfully while its fulfillment event disappears. The transactional outbox preserves the obligation to publish, even when processes crash or the broker is unavailable.19 min
  10. Change data capture: streaming database changesSearch indexes and other derived stores must follow database changes without making every application request update several systems. CDC moves that work into a recoverable pipeline, with explicit limits around ordering, retention and recovery.20 min
  11. Flash sales: preventing overselling of limited stockLimited-stock launches combine concurrent writes, payment delays and sudden overload. You need to preserve inventory without making customers wait behind requests that cannot succeed.19 min
  12. Design: a concert ticket booking systemBooking systems combine scarce inventory with slow, uncertain payments. The same problems appear in travel reservations, appointments and limited-stock checkout.30 min

Practise with

Terms this module teaches 32

Open glossary

Compensating operation

A new business operation that reverses an earlier effect when a multi-step process cannot complete.