Distributed Key-Value Store Challenge #
Welcome to the distributed key-value store challenge!
In this challenge, you’ll build a distributed key-value store from scratch. You’ll start with a simple HTTP API and progressively add persistence, crash recovery, clustering, replication, and consensus mechanisms.
By the end, you’ll have built a system that can handle node failures, network partitions, and scale across multiple nodes while maintaining data consistency.
Stages #
Build a basic in-memory key-value store with GET/PUT/DELETE operations over HTTP.
Add durability to your store. Data should survive clean shutdowns (SIGTERM).
Handle unclean shutdowns (SIGKILL). Ensure data consistency after crashes.
Discover and connect to other nodes in a leader-follower arrangement.
Add read replicas that follow the leader. Handle eventual consistency across the cluster.
Handle leader failures and network partitions while maintaining cluster consistency.
Implement strong consistency guarantees for read and write operations.
Distribute data across multiple shards for horizontal scaling.
Getting Started #
If you haven’t already, read this overview on how lsfr works and then start with stage 1 (HTTP API).
Resources #
Books #
- Designing Data-Intensive Applications by Martin Kleppmann
- Database Internals by Alex Petrov
Videos #
- Distributed Systems lecture series by Martin Kleppmann
- Intro to Database Systems by CMU Database Group