Interview Prep

System Design Interview Guide

System design interviews test your ability to architect scalable, reliable, and efficient systems. Whether you are targeting Google, Amazon, or any tech company, these concepts are essential for senior engineering roles.

Problem-Solving Framework

1

Clarify Requirements

Ask about scale (users, QPS), features (MVP vs full), constraints (budget, timeline), and non-functional requirements (latency, consistency, availability). This shows product thinking.

2

Estimate Scale

Calculate rough numbers: daily active users, requests per second, storage needs, bandwidth. Example: 10M users, 10% daily active = 1M DAU, ~12 QPS average, ~60 QPS peak.

3

Design High-Level

Start with basic components: clients, load balancer, application servers, database, cache. Draw the main data flow. Keep it simple first, then add complexity.

4

Deep Dive

Discuss specific components in detail: database schema, API design, caching strategy, message queues, CDN. Address the hardest problems first.

5

Address Bottlenecks

Identify single points of failure, discuss horizontal vs vertical scaling, database sharding, read replicas, and caching layers. Show you can think about production issues.

Core Concepts

βš–οΈ

Load Balancing

Distribute incoming traffic across servers. Algorithms include Round Robin, Least Connections, IP Hash, and Consistent Hashing. Use L4 (transport) or L7 (application) load balancers. Tools: NGINX, HAProxy, AWS ELB.

πŸ’Ύ

Caching

Store frequently accessed data in memory. Strategies: Cache-Aside (lazy loading), Write-Through, Write-Behind. Use Redis or Memcached. Consider cache invalidation, TTL, and thundering herd problem.

πŸ—„οΈ

Database Scaling

Read replicas for read-heavy workloads. Sharding for write-heavy workloads (horizontal partitioning). Vertical scaling for simplicity. Choose SQL (consistency) vs NoSQL (flexibility) based on use case.

πŸ“¨

Message Queues

Decouple services for reliability and scalability. Use Kafka for event streaming, RabbitMQ for task queues, SQS for managed queuing. Handle retries, dead letter queues, and exactly-once processing.

🌍

CDN & Edge

Cache static assets closer to users. Use CloudFront, Cloudflare, or Akamai. Serve images, JS, CSS from edge locations. Reduces latency by 50-80% for global users.

πŸ”Œ

API Design

REST for CRUD operations, GraphQL for flexible queries, gRPC for internal services. Use versioning, pagination, rate limiting, and proper HTTP status codes. Document with OpenAPI/Swagger.

Practice Problems

URL Shortener

Easy
HashingDatabaseCachingRedirects

Chat System

Medium
WebSocketsMessage QueuePresenceStorage

News Feed

Medium
Fan-outCachingRankingPush vs Pull

Video Streaming

Hard
CDNTranscodingChunkingAdaptive Bitrate

Rate Limiter

Easy
Token BucketSliding WindowRedisDistributed

Search Autocomplete

Medium
TrieRankingCacheReal-time Indexing
Ad Space Placeholder
ADVERTISEMENT