How does LevelDB work? I built one from scratch to find out
I built a key-value database engine from scratch in Go
NiroDB is an LSM-tree based KV store I built to understand how databases like LevelDB/RocksDB work under the hood.
What's inside:
- Skip List memtable (O log n reads/writes)
- Write-Ahead Log with CRC32 crash recovery
- SSTable v2 with Bloom Filter (~0.8% false positive rate)
- Size-tiered Compaction
- TCP Server with RESP protocol (Redis-compatible)
- Zero external dependencies
Still early stage but fully working. Would love feedback from people who know this space better than me!
Posted Mar 5, 2026, 11:28 AM UTC
91