Skip to main content

System Design Interview Overview

System design interviews test your ability to design large-scale distributed systems from scratch. Unlike coding interviews, there's no single correct answer โ€” interviewers evaluate your thought process, communication, and knowledge of trade-offs.

What Interviewers Are Looking Forโ€‹

SkillDescription
ScopingCan you clarify requirements and define the problem clearly?
EstimationDo you have intuition for scale and capacity?
ArchitectureCan you design a system with clear components?
Trade-offsDo you understand the pros/cons of each choice?
CommunicationCan you explain complex systems simply?
DepthCan you go deep on any component when asked?

The 4-Step Frameworkโ€‹

Use this framework for every system design question:

Step 1: Clarify Requirements (5 minutes)โ€‹

Never start designing before understanding what you're building.

Functional requirements โ€” What should the system do?

  • What are the core features?
  • What can we ignore for this interview?

Non-functional requirements โ€” How should it behave?

  • How many users? DAU (daily active users)?
  • Read-heavy or write-heavy?
  • Consistency vs. availability trade-off?
  • Latency requirements?
  • Data size and growth rate?

Example for "Design Twitter":

  • Users can post tweets (up to 280 characters)
  • Users can follow other users
  • Users can see a home timeline (tweets from people they follow)
  • 100M DAU, 50M tweets/day, 500M timeline reads/day
  • Eventual consistency is acceptable for timelines
  • P99 latency for timeline < 200ms

Step 2: Estimate Scale (5 minutes)โ€‹

Back-of-the-envelope calculations help you make the right architectural decisions.

Key numbers to remember:

OperationApproximate time
L1 cache read1 ns
L2 cache read4 ns
RAM read100 ns
SSD read16 ยตs
HDD read2 ms
Network round trip (same DC)0.5 ms
Network round trip (cross-DC)150 ms

Key data sizes:

ItemSize
Tweet~300 bytes
User profile~1 KB
Photo~300 KB
Video (1 min)~50 MB

Example calculation for Twitter:

Writes: 50M tweets/day = ~600 tweets/sec = ~1,200 tweets/sec at peak (2ร— average)
Reads: 500M timeline reads/day = ~6,000 reads/sec = ~60,000 reads/sec at peak

Storage:
- 50M tweets/day ร— 300 bytes = 15 GB/day of tweet data
- 3 years: 15 GB ร— 365 ร— 3 โ‰ˆ 16 TB (manageable on a large DB cluster)

Bandwidth:
- 1,200 tweets/sec ร— 300 bytes = 360 KB/sec write bandwidth
- 60,000 reads/sec ร— 300 bytes = 18 MB/sec read bandwidth

Step 3: Design the System (20-25 minutes)โ€‹

Start high-level, then go deep where it matters.

High-level architecture template:

[Client] โ†’ [Load Balancer] โ†’ [API Gateway] โ†’ [Service Layer] โ†’ [Database]
โ†•
[Cache Layer]
โ†•
[Message Queue]
โ†•
[Worker Services]

Key components to cover:

  1. API design โ€” What endpoints does the system need?
  2. Data model โ€” What tables/collections, and how are they related?
  3. Database choice โ€” SQL or NoSQL? Why?
  4. Caching strategy โ€” What to cache, where, and how to invalidate?
  5. Scalability โ€” How does the system handle 10ร— growth?

Step 4: Deep Dives (10-15 minutes)โ€‹

The interviewer will ask you to go deep on specific components. Common deep-dive topics:

  • Database design โ€” Sharding strategy, indexing, query optimization
  • Caching โ€” Cache invalidation, cache-aside vs. write-through
  • Message queues โ€” Kafka vs. SQS, exactly-once delivery
  • Search โ€” Elasticsearch, inverted indexes
  • CDN โ€” Edge caching, cache invalidation
  • Rate limiting โ€” Token bucket, sliding window algorithms

Common System Design Topicsโ€‹

Core Building Blocksโ€‹

ComponentWhen to Use
SQL Database (PostgreSQL, MySQL)Strong consistency, complex queries, transactions
NoSQL Document Store (MongoDB)Flexible schema, hierarchical data
NoSQL Key-Value (Redis, DynamoDB)High-speed reads, simple access patterns
NoSQL Wide-Column (Cassandra)Time-series, high write volume
Message Queue (Kafka, RabbitMQ)Async processing, event streaming
Object Storage (S3)Binary data, media files
CDN (CloudFront, Fastly)Static assets, geographic distribution
Search Engine (Elasticsearch)Full-text search, analytics
Cache (Redis, Memcached)Hot data, session storage

System Design Problems in This Guideโ€‹

  1. Design a URL Shortener (TinyURL) โ€” Great starter problem
  2. Design Twitter's Feed โ€” Fan-out on write vs. read
  3. Design WhatsApp/Chat System โ€” WebSockets, message delivery
  4. Design Netflix/Video Streaming โ€” CDN, encoding, chunking
  5. Design Uber/Ride-sharing โ€” Location services, matching
  6. Design a Rate Limiter โ€” Algorithms and distributed state
  7. Design a Search Engine โ€” Crawling, indexing, ranking
  8. Design a Key-Value Store โ€” Custom database internals

Common Mistakes to Avoidโ€‹

โŒ Starting to code โ€” System design is about diagrams and discussion, not code โŒ Not asking clarifying questions โ€” Never assume requirements โŒ Only describing the happy path โ€” Talk about failure modes and recovery โŒ Ignoring data volume โ€” Scale determines architecture โŒ Being too attached to one solution โ€” Show you understand trade-offs โŒ Going too deep too early โ€” Stay high-level until asked to dive deep โŒ Staying silent โ€” Think out loud; interviewers need to hear your reasoning


Resourcesโ€‹