System design interview questions

Practice system design interview questions. Each one is a structured walkthrough: requirements, data model, API, a high-level diagram, and deep-dive trade-offs.

8 questions

Design a URL Shortener

easy

Design a service like TinyURL or Bitly that turns long URLs into short, unique aliases and redirects users back to the original.

hashing
databases
caching

Design a Rate Limiter

medium

Design a rate limiter that caps how many requests a client can make in a time window, with token bucket and sliding window strategies.

algorithms
caching
distributed-systems

Design Pastebin

easy

Design a service that lets users store and share text snippets with shareable links, expiration, and read-heavy access patterns.

storage
databases
object-storage

Design Twitter

hard

Design a social feed that supports posting tweets, following users, and building a low-latency home timeline at scale.

fan-out
caching
feeds

Design a Chat App (WhatsApp)

hard

Design a real-time chat app like WhatsApp: WebSocket gateways, presence, per-chat message ordering, delivery receipts, and delivering to phones that are offline.

websockets
messaging
ordering

Design a Web Crawler

hard

Design a web crawler that fetches a billion pages a month: a URL frontier with per-host politeness, robots.txt, URL and content dedup, distributed fetchers, spider traps, and recrawl scheduling.

crawling
queues
politeness

Design a Key-Value Store

hard

Design a distributed key-value store like Dynamo or Cassandra: consistent hashing with virtual nodes, replication to N nodes, tunable quorums, surviving node failures with hinted handoff and anti-entropy, conflict resolution, and an LSM-tree storage engine.

partitioning
replication
consistency

Design a Notification System

hard

Design a notification system that sends push, SMS and email: user preferences and quiet hours, fan-out of a broadcast to 10 million users, per-channel queues, retries with backoff, a dead-letter queue, and an idempotency key so nobody gets the same notification twice.

queues
fan-out
retries