Back to problems
Key-Value Store System Design (Consistency, Replication & Scale)
Design a simple key-value store like Redis that allows fast storage and retrieval of data using unique keys. The service should support basic operations like get, set, and delete.
Constraints
Functional
Set/Get/Delete by key, optional TTL, batch get/set
Non-functional
Low latency (< 1ms in-memory), millions of ops/s, optional persistence, scalability, memory efficiency
Scale
1M ops/s, 100M keys, ~50 B key + ~1 KB value (~107 GB), 80:20 read/write
Stages ahead
1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs