AtomicKV: Distributed Key-Value Database
Architected a production-grade, distributed key-value database from scratch. By leveraging a single-threaded asynchronous event loop (epoll), a tiered storage engine (LRU Cache + Custom B-Tree), asynchronous background replication, and a masterless Gossip Protocol architecture, the system achieves massive concurrency, horizontal scalability, and high availability.
Read the full write-up
6
Total Technologies
5
Key Features
Technologies Used
C++
Linux epoll
B-Tree
Gossip Protocol
Bloom Filter
AWS EC2

Key Features
- Networking: Engineered a non-blocking network I/O layer utilizing Linux epoll, benchmarking at 10,000+ Requests/Sec on a single thread.
- Tiered Storage Engine: Designed an L1 RAM LRU Cache protected by a probabilistic Bloom Filter to instantly detect cache misses, falling back to a custom Order-3 B-Tree on disk.
- Scaling: Implemented a Consistent Hash Ring with virtual nodes for deterministic request routing across the cluster.
- High Availability: Built a masterless cluster topology using a Gossip Protocol for failure detection and automatic ring rebalancing.
- Eventual Consistency: Integrated Lamport Clocks for concurrent write conflict resolution (Last Write Wins) and asynchronous background replication.