Build a simple, fast, always-on store like Dynamo or Redis: partitioning, replication and consistency.
“Design a key-value store.”
It is short on purpose. Your first job is to make it specific.
| What they check | Why it matters |
|---|---|
| Starting simple, then distributing | A strong candidate builds one server first (hash table, log, snapshot), says exactly why it stops working, and only then spreads it out. |
| Knowing the building blocks | Partitioning (consistent hashing), replication, quorums, gossip, a storage engine. The question is about assembling known parts in a sensible order. |
| The consistency and availability trade-off | You must pick a side (CAP), explain it with N, R and W, and say what a client may see when things go wrong. |
| Failure handling in layers | Temporary failure, permanent failure, and stale replicas each have a different fix: hinted handoff, anti-entropy, read repair. |
| Conflict handling | Two writers, one key, no shared clock. Last-write-wins, vector clocks and CRDTs each lose something, and you should say what. |
Think of a giant, always-on dictionary spread over many machines. Any node can act as the coordinator for a request. It hashes the key onto a consistent-hashing ring and sends the request to the next N = 3 nodes on the ring, which hold the copies. You choose how many of those must answer: W for a write and R for a read.
| Step | Minutes | What to get done |
|---|---|---|
| 1. Clarify | 4 | Value size, consistency needs, availability, scale. Rule out range queries and transactions. |
| 2. Estimate | 3 | Data size, node count, operations per second per node, ring tokens. |
| 3. API and data | 4 | get, put, delete. The version or context that travels with each value. |
| 4. High-level design | 8 | Ring, coordinator, N replicas, gossip, and the storage engine on each node. |
| 5. Deep dives | 16 | Partitioning, quorums and conflicts, failure handling, then the single-node write and read path. |
| 6. Scale and failures | 7 | Hot keys, rebalancing, zone loss, monitoring, security. |
| 7. Wrap up | 3 | Recap, trade-offs, what you would add next. |
| Ask | Why you ask it | Typical answer | How it changes the design |
|---|---|---|---|
| What do we store: how big is a key and how big is a value? | Small values fit a simple design. Big values (megabytes) need chunking and a different path. | Keys up to 256 bytes. Values up to a few hundred KB, about 1 KB on average. | Small values: store them inside the LSM files. Cap the size, and send blobs to object storage instead. |
| Is it read-heavy or write-heavy? | Decides cache use, compaction cost, and which quorum values make sense. | About 80% reads and 20% writes. | Reads matter most: Bloom filters, row cache, and a read-friendly compaction strategy. |
| Must a read always see the latest write (strong consistency), or is a short delay fine? | This single answer picks the whole family of designs: leader and consensus, or leaderless and eventual. | A short delay is fine. Availability matters more. Let callers tune it per request. | Leaderless replication with tunable quorums (Dynamo style), not a consensus group per key. |
| What happens when two clients write the same key at the same time? | Forces the conflict question: lose one, or keep both and merge. | It is rare. Do not lose data silently if we can help it. | Version every value. Last-write-wins is the simple default, vector clocks or CRDTs where merging matters. |
| What availability and latency do we need? | Sets the replica count, zone spread, and how many nodes must answer. | 99.99% available. p99 under 10 ms for a read inside one region. | Three replicas across three zones. The coordinator must not wait for the slowest node. |
| How much data, and how fast does it grow? | Decides the node count, and whether adding nodes must be easy. | About 100 TB now, growing 10% a month. | Hundreds of nodes. Adding capacity must be a routine, online job. |
| Do we need range scans, secondary indexes, or multi-key transactions? | Hash partitioning scatters neighbouring keys, so range scans and joins are hard. | No. Only get, put and delete by exact key. | Hash partitioning is fine. Say clearly what we give up. |
| Single region or multi-region? | Cross-region latency changes how many copies you wait for. | One region with three zones first. Multi-region is a later phase. | Replicas spread across zones now. Design the preference list so a data-centre layer can be added. |
| How durable must a write be once it is acknowledged? | Decides whether an ack means ‘in memory’, ‘on disk’ or ‘on several disks’. | A successful write must survive the loss of one node. | Write to the commit log on W replicas before acknowledging. W is at least 2 for important data. |
| Do keys ever expire? Do we need TTLs? | Expiry means tombstones and cleanup in the storage engine. | Optional TTL per key. | Store an expiry time with the value. Expired data is dropped during compaction. |
| Assumption | Value |
|---|---|
| Data stored (one copy) | 100 TB |
| Average item (key + value + overhead) | 1 KB |
| Replicas per key (N) | 3 |
| Usable data per node | 2 TB (disks kept about half full so compaction has room) |
| Peak client operations | 1 million per second, 80% reads and 20% writes |
| Read quorum / write quorum | R = 2, W = 2 |
| Bloom filter size | 10 bits per key (about 1% false positives) |
| Virtual nodes per machine | 256 |
| Data growth | 10% a month |
| What | Maths | Result |
|---|---|---|
| Items stored (one copy) | 100 TB ÷ 1 KB = 10^14 ÷ 10^3 | 100 billion items |
| Data with 3 copies | 100 TB × 3 | 300 TB |
| Nodes needed for the data | 300 TB ÷ 2 TB per node | 150 nodes |
| Peak reads and writes per second | 1M × 80% and 1M × 20% | 800,000 reads and 200,000 writes |
| Replica operations per second | writes × 3 replicas + reads × 2 (R = 2) | 600,000 + 1,600,000 = 2.2 million |
| Replica operations per node | 2.2M ÷ 150 nodes | about 14,700 per second (client ops: 6,700) |
| Write bandwidth, client side | 200,000 × 1 KB | 200 MB per second |
| Write bandwidth inside the cluster | 200 MB/s × 3 copies, ÷ 150 nodes | 600 MB/s total, about 4 MB/s per node |
| Read bandwidth out | 800,000 × 1 KB | 800 MB/s, about 6.4 Gbit/s |
| Items held by one node | 100 billion × 3 ÷ 150 | 2 billion items |
| Bloom filter memory per node | 2 billion × 10 bits ÷ 8 | about 2.5 GB |
| Ring tokens | 150 nodes × 256 virtual nodes | 38,400 tokens |
| Data moved when adding one node | 300 TB ÷ 151 | about 2 TB (0.66% of the data) |
| Growth to plan for | 10% of 100 TB = 10 TB raw; × 3; ÷ 2 TB | 30 TB, about 15 new nodes a month |
| Availability of one key with R = W = 2 | 3p²(1−p) + p³, with p = 0.999 per node | about 99.9997% (if failures are independent) |
| Method | Path | Request | Response | Notes |
|---|---|---|---|---|
| GET | /v1/kv/{key}?consistency=quorum | none | 200 { value(s), context } | context is an opaque version (a vector clock). If versions conflict, several values are returned. 404 if missing. consistency can be one, quorum or all. |
| PUT | /v1/kv/{key} | { value, context?, ttl?, consistency? } | 200 { context } | Send back the context from the read you based this write on. 503 if fewer than W replicas answered in time. Idempotent: the same body and context can be retried. |
| DELETE | /v1/kv/{key} | { context? } | 204 | Writes a tombstone (a marker), it does not erase the data at once. Idempotent. |
| Stored per key | Type | Notes |
|---|---|---|
| key | bytes, up to 256 | Hashed to a 128-bit position on the ring. The hash decides placement. |
| value | bytes, up to a few hundred KB | Opaque to the store. Big blobs belong in object storage. |
| version (context) | vector clock, or a timestamp | Lets the store tell ‘newer’ from ‘concurrent’. |
| tombstone flag | boolean | A delete is a write that says ‘this key is deleted’. Needed so a delete wins over an old copy. |
| expires_at | timestamp, optional | Dropped during compaction after it passes. |
| Other state | Holds | Where |
|---|---|---|
| Ring membership | Which nodes exist, their tokens, and who is up | Every node, spread by gossip |
| Commit log | Every write, in order, for crash recovery | One log per node, on its own disk |
| Hints | Writes held for a node that was down | The stand-in node, for a limited time |
| Merkle trees | Hashes of key ranges, for comparing replicas | Each node, per range it owns |
GET /v1/kv/cart:42
200 {
"values": [
{ "value": "milk, eggs", "context": "[A:2, B:1]" },
{ "value": "milk, bread", "context": "[A:1, C:1]" }
]
}
// The client merges them (milk, eggs, bread) and PUTs the result
// with the combined context, which settles the conflict.| Component | What it does |
|---|---|
| Client library or coordinator | Any node can coordinate a request. It hashes the key, finds the replicas, sends the request to all of them, and answers when enough have replied. |
| Consistent-hashing ring | Decides which nodes own which keys. Virtual nodes spread each machine over many small pieces of the ring, so load is even and moving data is cheap. |
| Replicas (N = 3) | The next 3 distinct machines on the ring, picked from different zones. Together they are the preference list for the key. |
| Quorum settings (R and W) | How many replicas must answer a read or a write. Tunable per request. |
| Gossip | Every second or so, each node tells a few random peers what it knows about the cluster. News of a join or a failure spreads to everyone in a few seconds, with no central server. |
| Hinted handoff | If a replica is down, another node holds the write and a note, and hands it over when the replica returns. |
| Anti-entropy with Merkle trees | A background job compares hashes of key ranges between replicas and copies only what differs. |
| Storage engine (per node) | Commit log for durability, memtable for speed, SSTables on disk, Bloom filters to skip files, compaction to merge them. |
The problem: 100 billion keys must be spread over 150 machines so that load is even, a key can be found without asking a central server, and adding or removing a machine moves very little data.
| Option | How it works | Good | Bad |
|---|---|---|---|
| hash(key) mod number of nodes | Take the hash and the remainder after dividing by the node count. | Trivial. Even spread. | Adding one node changes the divisor, so almost every key moves. Unusable at this size. |
| Consistent hashing, one token per node | Put nodes and keys on a ring. A key belongs to the next node clockwise. | Adding a node moves only the keys next to it, about 1/N of the data. | With few tokens, load is uneven and a new node takes load from just one neighbour. |
| Consistent hashing with virtual nodes | Each machine owns many small tokens (say 256) spread around the ring. | Even load. A new node takes a little from many nodes, in parallel. Strong machines can own more tokens. | More ring metadata. Replica choice must skip tokens of the same machine. |
| Fixed partitions assigned by a coordinator | Cut the key space into, say, 10,000 fixed partitions and keep a table of which node owns which. | Simple to reason about. Used by Kafka, Elasticsearch and others. | Needs a metadata service that must be highly available, and a planned move for each change. |
A key is hashed to a position on the ring. The first token clockwise owns it, and the next two distinct machines (skipping tokens of the same machine, and preferring different zones) hold the other copies. That list of three is the preference list. Every node can compute it from the ring it learned by gossip, so there is no central lookup on the hot path.
With 150 machines and 256 tokens each, the ring has 38,400 tokens. Adding a machine adds 256 small pieces, taken a little from many neighbours, so about 2 TB moves (0.66% of 300 TB) and it is pulled from many nodes at once. That is what makes monthly growth of 15 nodes routine. See the Consistent Hashing topic for the basics.
| Event | What happens | Data moved |
|---|---|---|
| Node joins (mod N) | Almost every key gets a new owner | about 99% of the data |
| Node joins (consistent hashing, virtual nodes) | It takes tokens from many neighbours, and streams their key ranges | about 1/151 of the data (2 TB) |
| Node dies for good | Its ranges are re-copied to the next node on the ring, from the other two replicas | its share only (2 TB), from many sources |
| Zone lost | Every key has a copy in the other two zones (rack and zone awareness) | nothing moves at once, repair runs in the background |
The problem: Three copies of a key can differ. We need to say what a client sees, what happens when two clients write at once, and how copies come back together.
| Option | How it works | Good | Bad |
|---|---|---|---|
| One leader per key (consensus) | Writes go through a leader, copied to a majority with Raft or Paxos (etcd, Spanner style). | Strong consistency. No conflicts to merge. | A partition or leader loss makes the minority side unavailable. Higher write latency. |
| Leaderless with quorums (R + W > N) | Write to W of N replicas, read from R. If R + W > N, the sets overlap. | Highly available. Tunable per request. No leader to fail over. | Not linearizable in the general case (see below). Conflicts must be resolved. |
| Last-write-wins (a timestamp) | Each write carries a timestamp. The highest timestamp wins. | Simple. No client work. Used by Cassandra. | Clocks differ, so a ‘later’ write can lose to an ‘earlier’ one, and one of two concurrent writes is lost silently. |
| Vector clocks, client merges | Each value carries a counter per writer. A read returns all concurrent versions, and the client merges them. | Nothing is lost silently. Detects true concurrency. | More work for clients. Clocks can grow, so they are trimmed. Used by Dynamo and Riak. |
| CRDTs | Data types (counters, sets) that merge to the same result on every replica. | Automatic, safe merge. No client code. | Only for certain data shapes. Metadata overhead. |
We chose availability. With N = 3, W = 2 and R = 2, R + W = 4 > N = 3, so any read set of 2 and any write set of 2 share at least one node. A read that meets a replica holding the latest write sees it. A client can ask for W = 1 (fastest, may lose data if that one node dies), W = 3 (every copy, an unavailable write if any node is down), or R = 1 (fastest, may be stale). See Quorum (R + W > N) for the maths.
Be honest that quorum overlap is not linearizability. A write that fails after reaching only one replica can still show up in later reads. A sloppy quorum (writes accepted by a stand-in) can break the overlap until the hint is handed over. Two concurrent writes can both succeed. Reads may see them in different orders on different replicas. Each version carries a vector clock, so the coordinator can tell "this one is newer" from "these two are concurrent", and it returns both in the second case.
| Setting | Meaning | Use it for |
|---|---|---|
| N = 3, W = 2, R = 2 | Overlap guaranteed in the normal case. Survives one node down for reads and writes. | The default |
| N = 3, W = 1, R = 1 | Fastest. Reads can be stale. A write can be lost if its one node dies before copying. | Caches, view counters, anything you can recompute |
| N = 3, W = 3, R = 1 | Every copy gets each write, so a read from any one node is fresh. Writes fail if any node is down. | Read-heavy data that must be fresh |
| N = 3, W = 1, R = 3 | Fast writes, slow and thorough reads. | Write-heavy data that is rarely read |
start value "milk" clock [A:1] client 1 via A adds eggs -> "milk, eggs" clock [A:2] client 2 via B adds bread -> "milk, bread" clock [A:1, B:1] [A:2] and [A:1,B:1]: neither includes the other => concurrent. A read returns BOTH. The client merges: "milk, eggs, bread" and writes it back with clock [A:2, B:1] + its own bump.
The problem: Machines fail all the time at this size. A failure can last seconds or forever, and a node can come back with stale data. One fix does not cover all three cases.
| Option | How it works | Good | Bad |
|---|---|---|---|
| Strict quorum only | Write only to the 3 home replicas. Fail if fewer than W answer. | Simple. Keeps the overlap guarantee. | Less available: two nodes in the preference list down means no writes for that key. |
| Sloppy quorum + hinted handoff | If a home replica is down, send the write to the next healthy node with a hint, and hand it back when the replica returns. | Writes keep succeeding. A short outage heals by itself. | Weakens the overlap guarantee until the hint is delivered. Hints are kept only a limited time, and the stand-in can fail too. |
| Read repair | When a read sees a stale replica, write the newest version back to it. | Free: uses data already read. Heals hot keys quickly. | Only fixes keys that are read. Cold keys can stay stale for a long time. |
| Anti-entropy with Merkle trees | Replicas compare trees of hashes over key ranges, walk down the differing branches, and copy only the keys that differ. | Catches everything, including cold keys and brand-new nodes. Cheap when almost all data matches. | Background work and disk reads. Trees must be kept up to date. |
Each layer covers what the one before cannot. Hinted handoff handles a node that is down for minutes. Read repair fixes the keys people actually read, at no extra cost. Anti-entropy is the safety net: it guarantees that replicas converge even for keys nobody reads, and it is how a replacement node gets its data. The visualizer below lets you turn each layer on and off and watch what is left stale.
For failure detection, nodes gossip a heartbeat counter. If a node's counter has not grown for a while, others mark it suspect, and use an adaptive detector (phi accrual) instead of one fixed timeout, so a slow network does not cause false alarms. A false alarm is expensive here: it starts hinted writes and sometimes data movement for a healthy node. For permanent loss, an operator (or a long timeout) removes the node and its ranges are rebuilt from the other replicas. See Gossip Protocol, Heartbeats, Failure Detectors and Merkle Trees.
| Situation | Layer that handles it | How long it takes |
|---|---|---|
| Node down for 5 minutes | Hinted handoff | Seconds after it returns |
| Node down for 5 hours (hints expired) | Merkle anti-entropy, plus read repair on hot keys | Minutes to hours, depending on the gap |
| Node lost, empty replacement | Streaming plus anti-entropy | Hours, bounded by disk and network |
| One replica missed a write, nobody noticed | Read repair if the key is read, otherwise anti-entropy | Next read, or the next anti-entropy run |
| Network partition, both sides keep writing | Vector clocks show conflicts, merged on read | When the partition heals |
The problem: Every client write becomes three replica writes, so each node takes a heavy stream of small writes. It must survive a crash, write fast, and still read a key from billions of items in a few milliseconds.
| Option | How it works | Good | Bad |
|---|---|---|---|
| In-memory hash table only | Keep everything in RAM. | Very fast. | 2 TB per node does not fit in RAM. A crash loses everything. |
| B-tree on disk | Update pages in place, with a write-ahead log. | Predictable reads. Good for read-heavy workloads. | Each update is a random disk write, and pages are rewritten. Weak for a write-heavy replicated load. |
| LSM tree (commit log, memtable, SSTables) | Append to a log, keep recent writes in a sorted memory table, flush to immutable sorted files, merge them in the background. | Mostly sequential writes: very fast and cheap on SSDs and disks. Easy to compress. | A read may look in several files (read amplification). Compaction costs CPU and I/O (write amplification). |
The write is: append to the commit log (one sequential write, so a crash cannot lose it), insert into the memtable, and reply. When the memtable is full it is flushed as a new sorted file (an SSTable). The read is: check the memtable, then, for each SSTable from newest to oldest, ask its Bloom filter "could the key be here?" and only read files that say yes. With 10 bits per key, about 1% of the files that cannot hold the key get read by mistake, so a typical read touches one or two files.
Compaction merges SSTables, keeps only the newest version of each key, and drops expired data and old tombstones. That keeps reads fast and reclaims space. See LSM Trees, Write-Ahead Log (WAL) and Bloom Filters.
put(key, value, version):
commitLog.append(key, value, version) // sequential, fsync per batch
memtable.put(key, value, version) // sorted in memory
if (memtable.size > 64MB) flushToSSTable() // new immutable sorted file
reply
get(key):
best = memtable.get(key)
for sst in sstables.newestFirst():
if (!sst.bloom.mightContain(key)) continue // skip: definitely not here
v = sst.read(key) // index lookup + one block
best = newer(best, v)
return best // may be a tombstone => "deleted"| Cost | Why | What you can do |
|---|---|---|
| Read amplification | A key may be in several SSTables | Bloom filters, a row cache, and compaction to merge files |
| Write amplification | Compaction rewrites data several times | Pick a strategy that fits the load (size-tiered for writes, leveled for reads) |
| Space amplification | Old versions stay until compaction | Keep disks about half full, as in the estimate |
| Hot reads | A few keys get most reads | A row cache in memory in front of the SSTables |
A simplified model of one key with fixed rules (no random numbers). The read picks the replicas that are behind first, to show the worst case. Real systems contact all N replicas and use the first R answers, and hints are kept only for a limited time.
| Bottleneck | Fix |
|---|---|
| A hot key (one key gets most of the traffic) | Cache it in the client library or in front of the store for a few seconds. For reads, spread them over all replicas. For counters, split the key into several sub-keys and add them up on read. |
| Uneven load on the ring | Use many virtual nodes, give bigger machines more tokens, and watch per-node load and size, then move tokens. |
| Compaction using all the disk bandwidth | Throttle compaction, schedule it off-peak, keep disks about half full, and pick the strategy to match the workload. |
| Rebalancing and adding nodes slow the cluster | Stream data from many sources at a limited rate, one node at a time, and never rebalance during an incident. |
| Read latency tail (p99) from slow replicas or garbage collection | Send reads to all replicas and use the first R answers, or send a backup request after a short delay (hedged requests). |
| Large values | Cap the value size. Store big blobs in object storage and keep only a pointer in the store. |
| Gossip traffic and ring size at thousands of nodes | Gossip a few peers per round, send only changes, and keep the ring metadata small. Beyond a few hundred nodes, consider splitting into several clusters. |
| Failure | How the design copes |
|---|---|
| One node fails | Gossip marks it down. Reads and writes use the other two replicas. Hints are stored for it. It catches up on return. |
| A whole zone is lost | Every key has a copy in the other two zones, so R = W = 2 still works. Repair copies data to the survivors once the zone is declared lost. |
| The coordinator crashes during a write | The client times out and retries on another node. Writes are idempotent (same value and version), so a retry is safe. |
| A network partition splits the cluster | Both sides keep working with sloppy quorums. Conflicts are found by vector clocks and merged after healing. |
| A node returns with an old disk (stale data) | Anti-entropy and read repair bring it up to date. Do not let it serve as the only source until it has caught up. |
| Disk corruption | Checksums on every block detect it. The node drops the bad file and re-copies the range from other replicas. |
A Dynamo-style store: consistent hashing with virtual nodes spreads keys over about 150 machines, each key lives on 3 replicas in different zones, and R and W are tunable per request. Concurrent writes are detected with vector clocks and merged on read. Failures are repaired in layers: hinted handoff, read repair and Merkle-tree anti-entropy. Each node uses an LSM tree with Bloom filters, because every client write becomes three replica writes.
| Decision | What we gain | What it costs |
|---|---|---|
| Availability over strong consistency (AP) | Reads and writes keep working during failures and partitions. | Stale reads and conflicts are possible. The application may need to merge. |
| R = W = 2 with N = 3 by default | Overlap in the normal case, and survives one node down. | Slower than W = 1. Still not linearizable in every failure. |
| Sloppy quorum and hinted handoff | Writes succeed through short outages. | Overlap is weaker until hints are delivered. Hints use space and expire. |
| Vector clocks instead of last-write-wins | No silent loss of concurrent writes. | Clients must merge, and clock metadata grows. |
| LSM tree storage | Fast sequential writes, which suits a replicated write load. | Read amplification and compaction I/O. |
| Hash partitioning | Even load and cheap rebalancing. | No range scans and no secondary indexes. |
Where interviewers push hardest. Be precise about what quorums do and do not guarantee.
A change in requirements is a test of whether you understand why your design looks the way it does.
| New requirement | What changes in the design |
|---|---|
| Strong consistency is required for all keys | Replace leaderless writes with a consensus group per partition (Raft). Writes and reads go through the leader. The minority side of a partition becomes unavailable. Latency is a majority round trip. |
| Range queries by key prefix are required | Use ordered (range) partitioning or a partition key plus a sorted clustering key. Watch for hot ranges. Add rebalancing by splitting ranges. |
| Multi-region, active in every region | Local quorums per region and asynchronous cross-region replication. Version with region ids, merge conflicts, and define what a client sees after failover. |
| Values are large (megabytes) | Store blobs in object storage and keep a pointer, or chunk values with a manifest. Cap the size in the API. |
| Read-heavy workload, 99% reads | Add a cache in front, use leveled compaction to keep reads cheap, add more replicas and send reads to the nearest. |
| Transactions across several keys | Not natural here. Add a coordination layer (two-phase commit or a consensus-based transaction manager), or move to a database built for it. Say what it costs. |
| Counters that must be exact | Use a CRDT counter (a per-node count that is summed), or route all updates for one counter through one leader. Last-write-wins loses increments. |
| Strict data deletion rules (for example privacy requests) | Shorter tombstone grace and a repair schedule that meets it, a way to find all copies, and a plan for backups. Encryption with per-tenant keys lets you delete by destroying the key. |
| Area | Weak | Good | Great |
|---|---|---|---|
| Requirements | Starts with ‘use a hash table’. Never asks about consistency, size or scale. | Asks about value size, consistency, availability, scale. Rules out range queries. | Ties each answer to a design decision, and names the consistency choice before drawing anything. |
| Building up | Jumps straight to Dynamo with no reason for each part. | Starts with one node, then explains why it must be distributed. | Adds each part (partitioning, replication, quorums, gossip) only when a problem demands it. |
| Estimation | No numbers, or a node count with no basis. | Items, data size with replicas, node count, operations per node. | Uses numbers for decisions: tokens, Bloom filter memory, data moved per new node, and growth. |
| Consistency depth | Says ‘eventual consistency’ and stops. | Explains N, R, W, overlap, and picks AP with a reason. | Explains what quorums do not guarantee, compares last-write-wins, vector clocks and CRDTs, and names the CP alternative. |
| Failure handling | ‘We have replicas’ with no detail. | Covers gossip detection, hinted handoff and anti-entropy. | Matches each repair to a failure size, and explains tombstones and resurrected deletes. |
| Communication | Lists buzzwords without explaining. | Follows the 7 steps and explains. | States the trade-off for each choice, checks in, and handles curveballs calmly. |
| Mistake | Do this instead |
|---|---|
| Starting with the distributed design before the single-node one | Describe one server first (hash table, log, snapshot), say where it breaks, then distribute. |
| Saying ‘eventual consistency’ without N, R and W | Show the quorum numbers, the overlap rule, and what a client sees when it fails. |
| Claiming R + W > N gives linearizability | Say it gives overlap in the normal case, and list what breaks it: sloppy quorums, partial writes, concurrent writes. |
| Using hash mod N for partitioning | Use consistent hashing with virtual nodes, and show how little data moves when a node joins. |
| Last-write-wins with no mention of clock skew | Name the risk, and say where you would use vector clocks or CRDTs instead. |
| Putting all three replicas in one zone or rack | Choose replicas from different zones by walking the ring and skipping the same zone. |
| Forgetting how deletes work | Explain tombstones, the grace period, and the resurrected-delete risk. |
| Promising range scans on a hash-partitioned store | Say it is not supported, and what you would change to support it. |
The ring and virtual nodes used for partitioning.
The overlap rule behind tunable consistency.
How the store tells newer from concurrent writes.
How anti-entropy finds differences cheaply.
How membership and failures spread with no central server.
The storage engine inside each node.
How a read skips files that cannot hold the key.
The availability versus consistency choice behind this design.