TLDR: Bitcask - A Log-Structured fast KV store
Date: 2020-07-19 Source: https://arpitbhayani.me/blogs/bitcask
Overview
Bitcask was introduced as the backend for a distributed database named Riak in which each node used to run one instance of Bitcask to hold the data that it was responsible for. In this essay, we take a detailed look into Bitcask, its design, and find the secret sauce that makes it so performant. Bitcask is one of the most efficient embedded Key-Value (KV) Databases designed to handle production-grade traffic.
Key Points
- Bitcask is one of the most efficient embedded Key-Value (KV) Databases designed to handle production-grade traffic.
- Datafiles: Datafiles are append-only log files that hold the KV pairs along with some meta-information.
- KeyDir: KeyDir is an in-memory hash table that stores all the keys present in the Bitcask instance and maps it to the offset in the datafile where the log entry (value) resides; thus facilitating the point lookups.