Skip to content

System Design Advanced

Ten classic and AI-era system-design problems, each solved the way a strong senior candidate would answer it in a 45-minute interview.

What's inside

01

Design ChatGPT

LLM serving on GPUs, token streaming, conversation storage, batching and capacity planning.

AIServingStreaming

02

Design a vector database

HNSW and IVF indexes, sharding, metadata filtering, updates and deletes, recall vs latency.

AIIndexingSharding

03

Design semantic search for e-commerce

Hybrid retrieval, learning-to-rank, personalisation and evaluation with click data.

AISearchRanking

04

Design a rate limiter for LLM APIs

Limits by tokens, not just requests: token buckets, distributed counters and fair queuing.

AIRate limitingRedis

05

Design a URL shortener

ID generation, database choice, caching, redirects at scale and click analytics.

ClassicHashingCaching

06

Design a notification system

Fan-out across email, SMS and push, queues, retries, preferences and rate limits.

ClassicQueuesFan-out

07

Design a recommendation system

Candidate generation, ranking models, feature stores, cold start and feedback loops.

MLRankingFeatures

08

Design a news feed

Fan-out on write vs on read, celebrity accounts, ranking and feed caching.

ClassicFan-outCaching

09

Design a distributed cache

Consistent hashing, eviction policies, replication, hot keys and cache stampedes.

ClassicConsistent hashingReplication

10

Design a real-time chat app

WebSockets, presence, message ordering, delivery guarantees and offline sync.

ClassicWebSocketsOrdering

Every problem follows the interview framework

  1. Requirements — functional and non-functional, clarified like a real candidate
  2. Estimates — traffic, storage and bandwidth with back-of-the-envelope maths
  3. API and data model
  4. High-level design — diagram first, then walk the request path
  5. Deep dives — the two or three components interviewers push on
  6. Trade-offs, bottlenecks and follow-up questions