Cruxly

Cruxly › System design › Running the Design Interview

Deep Dives and Trade-offs

break your own design before the interviewer does

Open the interactive lesson

The last fifteen minutes decide your level. The interviewer will pick a component and push. If you get there first — naming your design's weakest point and fixing it — you are running the interview instead of surviving it.

Choose the dive yourself

:::warn Do not say "what would you like to dig into?" That hands over the one chance you have to demonstrate judgement — and it is the single most common way to end a strong sketch on a flat note. :::

Say this instead:

"Three things worry me here: the hot partition on active conversations, exactly-once delivery when a client retries, and what a user sees during a shard failover. The hot partition is the most likely to actually break, so I'll start there — unless you'd rather go elsewhere."

:::key Pick where your own numbers are least comfortable

:::

Trade-offs: name the cost, not just the benefit

what it buys everyone gets here what it costs most people stop short mitigation how you'd detect it residual risk what you still accept A trade-off with no cost named is not a trade-off — it is an advertisement. Getting to the fourth box is what separates a senior answer from a confident one.
The four beats, in order. Stopping after the first is the single most common way to sound junior while saying something technically true.

Worked example — a read-through cache:

"At a 99%+ hit rate it cuts p99 from 80 ms to about 5 ms. It costs me staleness — a profile edit is invisible for up to the TTL — and a thundering herd when a hot key expires and a thousand requests miss at once. I'd detect the first only from a user report, which is bad, so I'd invalidate on write rather than rely on TTL. For the second: single-flight on misses, or serve the stale value while one request refreshes it. I still accept a sub-second window where a reader can repopulate a stale value after an invalidation."

And an async write path:

"Writes via a queue absorb the spike and keep p99 flat. They cost me read-your-own-writes — the user posts and doesn't see it. I'd fix the *perception by rendering optimistically on the client and reconciling, rather than making the write synchronous again."*

The dives that come up most

DiveDetect it asThe fix
Hot partition"One partition's write latency climbing while the others are flat"Sub-partition the key, cache just the hot ones, or handle the outlier differently entirely
Duplicate processingNetworks retry — at-least-once is the defaultClient-generated ID + uniqueness constraint or dedupe table, with a stated window
Thundering herdA popular key expires, every request hits the database at onceSingle-flight lock, serve-stale-while-revalidating, or early refresh for one hot key; jittered TTLs when many keys would expire together
Cache invalidationTTL races, or write-through slows every writePick one, and say why the failure mode you kept is acceptable for this data
BackpressureQueue grows faster than consumers drain itA policy chosen before it happens — shed load, drop low-value work, or block producers

:::warn "Add more consumers" is not a backpressure policy Not if the bottleneck is downstream of them — more consumers just means more concurrent pressure on the thing that was already the constraint. :::

:::key The one line to remember for hot partitions "I'd see it as one partition's write latency climbing while the others stay flat." Detection comes first, before any fix — say it in that order. :::

Consistency, said precisely

expensive, exact cheap, delayed Strong every read sees the latest write balances, inventory, seat booking Read-your-own-writes author sees it now; others may lag pin the writer's reads to the primary Eventual converges, with an unstated window follower counts, feeds "followers see it in ~2s; the author sees it immediately"
The bottom sentence — window plus who notices — outranks naming any position on the spectrum by itself.

When you do not know

How to say it in the interview

"The weakest part of this design is the conversation shard — a very active group makes one partition hot. Let me work through that unless you'd rather dig somewhere else."

Checklist

Practice this interactively
Share this lessonWhatsAppLinkedInX

Related lessons