Bicycle Guide

Book Profile

Database Internals A deep-dive into how distributed data systems work

Alex Petrov · 2019

A deep dive into the internal algorithms and data structures of database systems, focusing on how they store data locally in storage engines and coordinate across multiple nodes in distributed systems.

Get the book →

For software developers, reliability engineers, and architects who rely on databases but find their inner workings a mystery, "Database Internals" demystifies the complex world of storage engines and distributed data systems. Author Alex Petrov provides a concise yet thorough tour of fundamental concepts, from disk-based B-Trees and log-structured merge-trees to distributed algorithms for failure detection, leader election, replication, and consensus. By breaking down the trade-offs in storage design (buffering, immutability, ordering) and the challenges of distributed computing (CAP theorem, consistency models), this book equips you with the mental models needed to choose the right database, troubleshoot performance issues, and build more resilient applications.

What it argues

This model outlines how key architectural choices in database system design, particularly concerning storage engines and distribution mechanisms, lead to specific intermediate system behaviors (like amplification and overhead) and ultimately determine overall system performance outcomes like workload performance, availability, and consistency.

Key ideas it contributes