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 - How would you design a rate limiter?
A rate limiter caps how many requests a client can make in a time window, for example 100 per minute per user, and rejects extras with HTTP 429. Common algorithms are token bucket (allows short bursts), fixed window, sliding window log and sliding window counter. In a distributed system the counters live in a shared store like Redis and are updated atomically.
AdvancedIn-depth4 min read - When would you pick Redis over Memcached for a cache?
Memcached is a simple, fast key-value cache. Redis adds data structures (lists, sets, sorted sets), optional persistence, replication and pub/sub, so choose Redis when you need more than plain get and set.
IntermediateQuick answer1 min read