A pure Go embedded key/value database with ACID transactions, inspired by LMDB.
Bolt is an embedded key/value database for Go applications, providing a simple, fast, and reliable way to store data without requiring a separate database server. It solves the need for lightweight persistence in projects where full relational databases like Postgres or MySQL are overkill, offering ACID transactions and a minimal API.
Go developers building applications that need embedded, transactional storage—such as desktop apps, mobile apps (via gomobile), services requiring high read performance, or tools where simplicity and single-file deployment are key.
Developers choose Bolt for its simplicity, reliability, and ACID compliance in an embedded package. Unlike LevelDB or RocksDB, it supports full serializable transactions, and unlike server-based databases, it has zero network latency and runs entirely within the application process.
An embedded key/value database for Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports fully serializable transactions with MVCC, ensuring data consistency and safe concurrent reads without corruption, as highlighted in the README's focus on reliability.
Runs as a library within your Go application, stored as a single file for easy deployment and backups, eliminating network overhead and server management.
Uses a B+tree structure enabling fast prefix and range queries via cursors, making it ideal for sorted data iteration and sequential access.
Read-only transactions return direct references to memory-mapped data, reducing allocation overhead and improving performance for read-heavy workloads.
The README admits random writes can be slow, recommending batch transactions or a write-ahead log for mitigation, which adds complexity for write-intensive apps.
Only one read-write transaction is allowed at a time due to an exclusive file lock, preventing multi-process write access and limiting scalability for concurrent systems.
The original author has discontinued active maintenance, suggesting the bbolt fork for updates, which poses risks for bug fixes and long-term support in the original repo.