Distributed Key-Value Store with Replication
Build a networked key-value store where a primary node accepts writes and replicates them to follower nodes over TCP, with followers serving reads and reconnecting after network interruptions. Learners practice distributed systems fundamentals, async networking, and designing a simple replication protocol.
- Estimate
- ~10.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
Tokio · serde
Project roadmap
- 01
Build the single-node key-value store
~2hImplement a basic in-memory store with get/set/delete operations exposed over a simple TCP protocol using serde for message encoding.
- 02
Implement primary-to-follower replication
~2.5hHave the primary node stream write operations to connected follower nodes as they occur.
- 03
Handle follower reconnection and catch-up
~2.5hImplement a simple log or snapshot mechanism so a reconnecting follower can catch up on missed writes.
- 04
Route reads and writes appropriately
~1.5hEnsure writes are only accepted by the primary while followers can serve read requests locally.
- 05
Test failure scenarios
~2hWrite tests or a manual test harness simulating a follower disconnecting and reconnecting mid-stream.
Resources
- DocsThe Rust Book
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack