Part 4 of 8 · week 4 of the learning path
When data volume, speed or complexity is the main challenge, the design comes down to four choices: how data is stored, copied, split and kept consistent.
Learning objectives
Choose a storage engine and data model for a workload.
Reason about replication, partitioning and the anomalies they create.
Pick transaction and consistency levels, and decide between batch and stream processing.
Storage
Choice Strength Used by
B-tree Updates in place, fast reads, mature indexing Most relational databases
LSM-tree Fast writes through sequential appends and background compaction Cassandra, RocksDB and similar
Row store Whole-record reads and writes (OLTP) Application databases
Column store Scanning a few columns over many rows (OLAP) Warehouses and analytics
Replication
Leader and followers: writes go to the leader and copy to followers, synchronously or asynchronously; simple and common.
Multi-leader: several leaders accept writes, useful across regions, but…