Distributed Data — Replication, Partitioning & Consensus
Choose data guarantees per entity instead of inheriting database defaults. Replication topologies and commit modes, consistency models in precise terms, quorums and PACELC, failover with fencing; partitioning and resharding; consensus, leases and fencing tokens; transactions across services with sagas and the outbox pattern; storage engines and choosing a datastore; and caching as a dependency. Labs run real databases in Docker.
What you'll be able to do
- Name the consistency model a requirement needs and what it costs
- Predict the data-loss window and read anomalies of a replication setup
- Partition data and plan resharding without downtime
- Design cross-service workflows with sagas, the outbox pattern and idempotency
- Choose a datastore and a caching strategy you can defend
Before you start
Several years running production systems. Kubernetes, Linux networking, TLS and one cloud provider are assumed; basics link to the right course on this site instead of being re-taught.
How it works
Each lesson: forces → first principles → design space → failure modes with a published incident → lab where a laptop allows → the architect's lens → a design review with a Senior / Staff / Principal rubric. Each section ends with a cheat sheet & self-check.
Curriculum
Lessons marked “Read” are ready; the rest are on the way.
Copies and partitions
- 01Replication and consistencyTopologies, synchronous vs quorum commit, consistency models, quorums, PACELC, failover and fencingRead →
- 02Partitioning and shardingRange vs hash, consistent hashing, hot keys, secondary indexes, resharding without downtimeSoon
- 03Consensus and coordinationRaft, leader election, leases, fencing tokens, why coordination stores stay smallSoon
- 📋Cheat sheet & self-checkEvery command from this section on one page, then 9 questions to check yourself.Open →
Transactions and storage
- 04Transactions across servicesIsolation levels, 2PC, sagas, the outbox pattern, idempotency, exactly-once in practiceSoon
- 05Choosing a datastoreB-trees vs LSM trees, access patterns, a decision matrix you can defendSoon
- 06CachingCache-aside, write-through, invalidation, stampedes, the cache as a dependencySoon
Real-world scenarios
Work through each one: symptom → misleading signal → evidence → root cause → prevention.
Automated cross-region failover promoted a lagging replica. What should have decided the promotion?
Read replicas were added last sprint. Which guarantee broke, and what is the cheapest fix?
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.