You already know: indexes, transactions, replicas and partitions on one database (D1 Databases); consistency models, quorums and consensus (Distributed systems fundamentals); logs and change data capture (Messaging & event processing); vector indexes (D8 Vector databases).
Why this matters for Atlas. Data outgrows one machine in two ways: too many reads and writes (load) and too much data (size). The two tools are replication (copies of the same data on several machines: availability, read scaling, locality) and partitioning or sharding (different data on different machines: write scaling, capacity). Each creates its own problems: replication creates lag and conflicts; partitioning creates hotspots and expensive rebalancing. For bulk data (datasets, checkpoints, model weights), object storage trades features for nearly unlimited, cheap, durable capacity. This lesson builds each piece with numbers.
1. Replication and its lag
The question. Students answer a quiz, then see their old progress. Why?
Start from nothing. In leader-follower replication, writes go to the leader, which streams its log to followers; reads can go to any replica. Replication is usually asynchronous (the leader confirms the write before followers apply it), so followers lag by milliseconds normally, and by seconds or minutes under load or after network trouble. A read served by a lagging follower shows stale data, including the student's own write. Remedies, cheapest first: