Distributed Key-Value Store
Preview mode. Log in to write architecture notes, save your answer, and get feedback.
Distributed Key-Value Store
Design a distributed key-value store similar to Amazon DynamoDB or Apache Cassandra. Functional Requirements: - Put(key, value) - store a key-value pair - Get(key) - retrieve the value for a given key - Delete(key) - remove a key-value pair - Support for configurable consistency levels (strong, eventual) - Automatic data partitioning across nodes Non-Functional Requirements: - Highly available (no single point of failure) - Horizontally scalable by adding more nodes - Durable - data survives node failures - Low latency (<10ms for reads and writes) Scale: - Petabytes of data across thousands of nodes - Millions of operations per second
Examples
How would you handle a network partition between data centers?
Approach hint
Think about how to distribute data across nodes. Simple modular hashing has a problem when nodes are added/removed - what's a better approach?
Common mistake
Skipping assumptions, edge cases, or trade-offs can make an otherwise good answer feel incomplete.