How to accept more writes without losing control of correctness.
What breaks first when writes grow: the database CPU, hot keys, ordering, durability, or downstream consumers?
Before reading, name the exact write being accepted and the promise made after acceptance.
Write scaling returns in analytics, messages, notifications, feed fan-out, and video processing.
A read asks for a copy of the truth. A write tries to change the truth. That difference is why write scaling usually hurts earlier and more sharply than people expect.
When too many writes hit the same path, the problem is usually not just volume. The real issue is contention, coordination, burstiness, or a hidden central bottleneck like one hot counter or one overloaded partition.
The stronger answer connects the kind of pressure to the smallest justified fix.
Scaling writes mainly means sharding the database.
Write scaling means accepting writes safely, partitioning pressure, buffering bursts, and preserving the correctness promise.
Separate acceptance from processing, then decide what must be durable before returning success.
| Write-scaling choice | Good when | Weak when | Interview line |
|---|---|---|---|
| Keep a simple single write path | Write volume is still manageable and correctness is easier with one primary path. | The write path is saturated or one node is the obvious bottleneck. | I would keep the write path simple until contention or saturation actually shows up. |
| Queue and absorb bursts Default | Writes arrive unevenly and some completion can happen shortly after the request. | The user must know the final durable result immediately for every step. | A queue helps if the main problem is bursty write load rather than strict immediate completion. |
| Batch writes | Many small writes can be grouped without harming the product requirement. | Each write must be visible or durable immediately and independently. | Batching helps when the overhead per write is the problem and slight delay is acceptable. |
| Partition or shard writes | Writes can be spread naturally by key, tenant, region, or ownership. | The partition key creates hotspots or queries become much harder than before. | Partitioning helps only if the chosen key actually spreads write ownership well. |
| Coordinated or distributed ID generation | Many servers create records concurrently and uniqueness must hold. | One central allocator becomes the write bottleneck or collision handling is weak. | I need an ID strategy that guarantees uniqueness without forcing every write through one hot counter. |
Do not jump straight from reading to a full answer. First see the shape, then complete part of it, then answer alone.
I would accept click events quickly into a durable log, then process aggregates asynchronously.
For ad clicks, identify the hot partition risk and one way to spread writes.
Answer the practice prompt with acceptance, buffering, processing, and failure handling as separate steps.
Before moving on, turn recognition into production. Close the model answer, answer from memory, then retry one small slice.
Say the chapter's core idea without looking. Then name one related idea from an earlier chapter.
Change one constraint in the practice prompt and answer again in half the time.
Use the rubric to pick one dimension below 3, then retry only that dimension.
A hot key, a hot partition, a bursty path, or a central allocator.
Queue, batch, repartition, or fix ID generation.
They rarely deserve the same latency and correctness contract.