LobstersSunday · May 24, 2026FREE

The Architecture of BerkeleyDB

berkeleydbdatabasearchitectureembedded

This chapter from the Architecture of Open Source Applications book provides an in-depth look at Berkeley DB, an embedded database library originally developed at UC Berkeley. It explains the core architecture, including the access methods (B-tree, hash, queue, recno), the logging and recovery system for crash resilience, and the concurrency control mechanisms (locking, MVCC). The chapter details how Berkeley DB operates as a library linked directly into applications, avoiding client-server overhead. It discusses the design decisions behind the B-tree implementation, such as page splitting and compression, and the transaction subsystem that ensures ACID properties. The text also covers the replication framework for high availability and the configuration options for tuning performance. Berkeley DB has been widely used in open-source projects like OpenLDAP and Sendmail, and its architecture influenced later embedded databases. The chapter is written by Margo Seltzer and Keith Bostic, key contributors to the project.

// why it matters

Understanding Berkeley DB's architecture informs design of embedded databases and transactional storage systems.

Sources

Primary · Lobsters
▸ Read original at aosabook.org

Like this? Get the next digest.