Interview Q&A / System Design
System Design interview questions
Caching, scaling, databases and classic design problems for beginners.
Prefer rapid revision? Practise System Design short interview answers →
- What is caching and what caching strategies should you know?
A cache keeps a copy of frequently used data in faster storage, like memory, so repeated reads are quick. Know cache-aside, write-through and write-back, eviction policies like LRU, TTLs, and the hard part, keeping the cache consistent with the database.
BeginnerIn-depth3 min read - What is the difference between latency and throughput?
Latency is how long one request takes; throughput is how many requests the system finishes per unit of time. You can improve one without the other, and pushing throughput too hard often raises latency.
BeginnerQuick answer1 min read - What is a hot partition and how do you fix it?
A hot partition is a shard or partition that receives far more traffic than the rest, so it becomes the bottleneck. Fix it with better keys, key salting, splitting the hot shard, or caching hot items.
IntermediateQuick answer1 min read - What is lazy initialisation in useState, and when should you use it?
Pass a function to useState, as in useState(() => compute()). React runs it only on the first render. Without the function form, the expensive call runs on every render, even though its result is ignored after the first.
IntermediateQuick answer1 min read - What is the N+1 problem in GraphQL and how is it solved?
N+1 happens when fetching a list triggers one query for the list and then one extra query per item for a nested field. DataLoader batches those per-item lookups into a single query.
IntermediateQuick answer1 min read