Software Engineering Architecture Lab

Storage Engines: B-Trees vs LSM-Trees

Pages and in-place updates vs append-only logs, SSTables and compaction. Lesson 1 of Level 8: Data-Intensive Systems. Based on DDIA.

Level 8 · Data-Intensive Systems · Lesson 1 of 15

Pages and in-place updates vs append-only logs, SSTables and compaction.

Continue learning

Try it hands-on

  • B-Tree vs LSM-Tree — Insert keys into both engines side by side and watch page splits, memtable flushes, SSTables and compaction happen.
  • Database Index — Query 10,000 ShopFlow orders with and without an index; count rows examined and see write costs rise.
  • Database Internals Lab — Storage engines, indexes, replication and partitioning.

All lessons in Data Systems

  1. Storage Engines: B-Trees vs LSM-Trees
  2. Indexes: Fast Reads, Slower Writes
  3. Caching: Speed at the Cost of Truth
  4. Replication: Leaders, Followers & Failover
  5. Replication Lag: When Your Own Write Disappears
  6. Partitioning: Hash, Range, Hotspots & Rebalancing
  7. Transactions & What ACID Actually Promises
  8. Isolation Levels: Dirty Reads to Serializable
  9. Lost Updates: Optimistic vs Pessimistic Locking
  10. The Trouble With Distributed Systems
  11. Consistency Models, CAP & Consensus
  12. Logs & Kafka: Partitions, Offsets and Ordering
  13. Consumer Groups & Delivery Semantics
  14. Batch vs Stream Processing & Data Pipelines
  15. Event Sourcing & CQRS