Distributed Systems
Overview

Distributed Systems

When one machine isn't enough, and you need to coordinate across many.

The hardest problems in backend engineering live here. Consistency, availability, partitions, consensus — these are the concepts that separate junior from senior engineers.


Topics

ChapterWhat It Covers
CAP TheoremWhy you can't have it all, what it actually means
PACELC TheoremCAP's sequel — the latency/consistency tradeoff even without a partition
Consistency ModelsStrong, eventual, causal, linearizability
Consensus AlgorithmsPaxos, Raft, ZAB — how nodes agree
Distributed Transactions2PC, 3PC, Saga, Outbox, Event Sourcing, CQRS
Distributed PatternsCircuit breaker, bulkhead, retry, timeout, fallback
Distributed Data StructuresCRDTs, vector clocks, Lamport timestamps, gossip protocols
Service DiscoveryClient-side vs server-side, DNS-based, Consul, etcd
Configuration ManagementCentralized config, feature flags, dynamic reconfiguration, secrets

Why This Matters

Every distributed system makes tradeoffs between consistency and availability. Understanding why — not just memorizing "CP vs AP" — lets you reason about any system architecture you encounter.