A highly concurrent, fault-tolerant, and masterless distributed Key-Value store built entirely from scratch in Modern C++, featuring a real-time visual dashboard built in React & Tailwind CSS.
Engineered to handle massive scalability, this system implements core distributed systems concepts inspired by Amazon Dynamo and Apache Cassandra.
- Implemented a Ring Topology using the 64-bit FNV-1a Hash Algorithm to ensure uniform data distribution and eliminate hot spots.
- Configured with 100 Virtual Nodes (vNodes) per physical server to achieve perfect load balancing and seamless scaling.
- Strict Quorum Logic (W=2): Ensures strong consistency. A write operation is only considered successful if acknowledged by at least 2 nodes. Fails safely with automatic rollback.
- Write-Ahead Logging (WAL): Disk-backed crash recovery. Every node recovers its exact state from local logs instantly upon reboot.
- Gossip Protocol: Background heartbeat threads monitor cluster health, instantly detecting node failures and dynamically updating the routing topology.
- Architected a thread-safe custom Storage Engine utilizing
std::shared_mutex(Read-Write Locks). - Achieved 16,132 Requests Per Second (RPS) with a highly concurrent load of 100 simultaneous threads, maintaining an average latency of just ~6ms (Benchmarked via Apache
ab).
- Dynamically supports adding or removing nodes.
- Exposes an
/admin/rebalanceendpoint that intelligently calculates hash boundaries and migrates live data to new nodes without cluster downtime.
- A real-time React/Vite dashboard that visualizes the Consistent Hashing Ring.
- Chaos Engineering Controls: Inject massive workloads or simulate node deaths with a single click to visually demonstrate data rebalancing and fault tolerance in real-time.
- Backend Engine: Modern C++ (C++17)
- Networking/HTTP:
cpp-httplib - Frontend UI: React.js, Vite, Tailwind CSS
- Performance Testing: Apache Bench (
ab) & Custom Bash Scripts
- GCC/G++ (Supports C++17)
- CMake & Make
- Node.js & npm (For the UI)
mkdir build && cd build
cmake ..
make