Skip to content
PPreptima

System Design interview questions

Open-ended design rounds broken into the building blocks they draw on, plus full case studies worked end to end with explicit trade-off reasoning.

17 published across 12 topics.

System design fundamentals60 short answers on one page, for revising rather than studying.

Design Fundamentals

1 question

Requirements gathering, capacity estimation, and structuring the first ten minutes of a design round.

mediumDesign

How do you spend the first ten minutes of a system design round?

Spend roughly three minutes agreeing the functional scope, three pinning the numbers that change the architecture, and four turning those numbers into a derived estimate of request rate, storage and bandwidth — then state which design decision each number forces.

5 minmid, senior, staff

Scalability & Load Balancing

1 question

Horizontal versus vertical scaling, load-balancer strategies, and stateless service design.

mediumDesignConcept

When do you scale out instead of up, and what does that force you to change?

Scale up while one machine can still hold the workload, because it costs no distributed complexity; scale out once you need redundancy or exceed the largest instance. Scaling out only works if the tier is stateless, which means externalising session state rather than pinning users to a node.

6 minmid, senior

Caching

2 questions

Cache placement, eviction, invalidation, and the stampede and coherence failure modes.

hardDesignConcept

How do you handle cache invalidation, and what goes wrong at scale?

Pick a write policy that matches your consistency requirement rather than treating invalidation as an afterthought, then defend against the three failure modes that only appear under load: stampede on expiry, staleness from lost invalidation messages, and unbounded growth from missing eviction.

3 minmid, senior, staff
hardDesign

Where do you put the cache, and how big does it need to be?

Choose the layer by who else can reuse the same bytes and how tolerable staleness is that far from the user, then size it from the working set rather than the dataset. Watch the miss rate, not the hit rate: origin load is proportional to misses, so 99 percent falling to 95 is a fivefold traffic increase.

6 minmid, senior, staff

Databases & Storage

2 questions

Choosing a store, sharding and partitioning, replication topologies, and storage-engine trade-offs.

hardDesign

How do you choose a datastore, and then how do you choose its shard key?

Choose the store from the dominant access pattern and the invariants it must enforce, not from a category label. Choose the shard key so the most frequent query is answerable from one shard, the key has enough distinct high-traffic values to spread load, and shards can be split later without rewriting every row.

6 minsenior, staff, lead

Consistency & Availability

2 questions

CAP and PACELC in practice, consistency models, consensus, and what you give up under partition.

Messaging & Streaming

1 question

Queues versus logs, delivery guarantees, ordering, backpressure, and exactly-once claims.

API & Contract Design

2 questions

Resource modelling, pagination, idempotency, versioning, and backward compatibility.

Rate Limiting & Resilience

1 question

Throttling algorithms, circuit breakers, retries with jitter, bulkheads, and graceful degradation.

hardDesignConcept

You need to enforce 100 requests per minute per API key across a fleet of forty servers. Which limiting algorithm, and where does the counter live?

Fixed windows permit twice the limit across a boundary; the two sliding windows fix that at a memory or an accuracy cost; token bucket permits a bounded burst and leaky bucket smooths output instead. Across a fleet the counter must sit in one store mutated atomically, or each node silently enforces its own limit.

6 minmid, senior, staff

Search & Ranking Systems

1 question

Inverted indexes, relevance scoring, and the ingestion-to-query pipeline of a search product.

Observability at Scale

1 question

Metrics, logs, traces, cardinality control, and designing systems that can be debugged live.

Security & Multi-tenancy

1 question

Tenant isolation, secrets management, defence in depth, and threat modelling a distributed system.

hardDesignCase Study

Four thousand business customers share your SaaS platform. What are your tenant isolation options, and how do you make a cross-tenant data leak structurally impossible rather than merely unlikely?

Isolation runs from a tenant_id column through separate schemas and databases to a stack per tenant, trading efficiency against blast radius. Careful filtering is not an isolation model: push the predicate below the application with row-level security and scope caches and object prefixes too.

7 minsenior, staff, lead

Full Case Studies

2 questions

Complete designs worked end to end: URL shortener, news feed, chat, ride-hailing, and more.

hardDesignCase Study

Design the home feed for a social network.

Size it first: 200M daily actives opening the feed six times a day is 42k reads/s at peak, while 100M posts fanned out to 200 followers each is 231k feed writes/s, so writes dominate. Push to ordinary accounts, pull for high-follower ones, and store ids so deletes and blocks filter on read.

8 minmid, senior, staff
hardDesignCase Study

Design a URL shortener.

Clarify scale first, then size it: 100M new links a day at a 100:1 read ratio gives roughly 1.2k writes/s and 116k redirects/s, needing 7-character base62 keys. Generate keys from leased counter blocks scrambled by a bijection, serve reads from cache and CDN, and redirect with 302 rather than 301.

6 minmid, senior, staff