System Design Interview — Examples & Questions
Master system design interviews with all 28 complete architectural chapters from the System Design Notes guide (complete with all 392 diagrams), plus 9 classic FAANG case studies and 19 distributed systems building blocks.
How to Approach Any System Design Question
- 1 Clarify requirements — functional and non-functional (scale, latency, consistency)
- 2 Estimate scale — daily active users, requests per second, storage needs
- 3 Design high-level architecture — components and data flow
- 4 Deep-dive into bottleneck components — DB schema, caching, sharding strategy
- 5 Discuss trade-offs — SQL vs NoSQL, push vs pull, consistency vs availability
- 6 Identify and address failure modes — what happens when X goes down?
System Design Chapters (All 28 Chapters)
Complete, chapter-by-chapter architectural breakdowns with all 392 system diagrams, algorithms, and deep dives.
Chapter 1: Scale From Zero to Millions of Users
A comprehensive, step-by-step architectural guide to evolving a web application from a single server to a globally distributed, highly available system serving millions of users.
Chapter 2: Back-of-the-Envelope Estimation
Master quick, high-precision back-of-the-envelope calculations for system design interviews: powers of two, latency benchmarks, availability nines, and Twitter QPS estimates.
Chapter 3: A Framework for System Design Interviews
The battle-tested 4-step framework to ace any 45-minute system design interview: clarifying requirements, high-level architecture, deep dive bottlenecks, and wrap-up.
Chapter 4: Design a Rate Limiter
Design a distributed API rate limiter to protect services from DoS attacks and traffic spikes. Covers Token Bucket, Leaking Bucket, Sliding Window Log, and Redis clustering.
Chapter 5: Design Consistent Hashing
Deep dive into consistent hashing to solve data skew and hotkey issues. Covers hash ring topologies, server lookups, node additions/removals, and virtual node balancing.
Chapter 6: Design a Key-Value Store
Architect a highly available, fault-tolerant distributed key-value store with tunable consistency, quorum replication, vector clocks, SSTables, LSM trees, and gossip protocols.
Chapter 7: Design a Unique ID Generator in Distributed Systems
Design an ultra-fast, 64-bit unique ID generator that scales to tens of thousands of IDs per second without database bottlenecks. Covers Snowflake, UUID, and Ticket Servers.
Chapter 8: Design a URL Shortener (TinyURL)
Design a high-scale URL shortening service like TinyURL or Bitly. Covers Base62 encoding, hash collision resolution, 301 vs 302 redirects, DB schema, and edge caching.
Chapter 9: Design a Web Crawler
Architect an internet-scale distributed web crawler capable of crawling billions of web pages. Covers URL frontier, politeness, Bloom filter deduplication, and streaming storage.
Chapter 10: Design a Notification System
Design a scalable notification engine that sends millions of push notifications, SMS alerts, and emails daily with deduplication, template rendering, and retry queues.
Chapter 11: Design a News Feed System
Design a social media news feed system. Deep dive into Fan-out-on-Write (push) vs Fan-out-on-Read (pull), celebrity hotkeys, hybrid feed generation, and multi-tiered caching.
Chapter 12: Design a Chat System
Architect a 1-on-1 and group chat system serving millions of concurrent connections. Covers WebSockets, presence servers, message sequence IDs, and multi-device synchronization.
Chapter 13: Design a Search Autocomplete System
Design real-time search typeahead suggestion system returning top 5 suggestions under 100ms. Covers Trie serialization, frequency aggregation, sampling, and browser caching.
Chapter 14: Design YouTube
Design a planetary-scale video upload and streaming platform. Covers video transcoding DAGs, adaptive bitrate streaming (HLS/DASH), geo-distributed CDN caching, and presigned URLs.
Chapter 15: Design Google Drive
Architect a cloud storage and multi-device synchronization service like Google Drive. Covers block-level chunking, delta sync, content-addressable storage, and strong consistency.
Chapter 16: Proximity Service
Design a proximity search service discovering nearby points of interest (restaurants, hotels). Explores 2D spatial indexing, Geohash precision boundaries, and Quadtrees.
Chapter 17: Nearby Friends
Architect real-time proximity friend finder updating locations every few seconds. Covers WebSocket connections, Redis Pub/Sub channels, location caching, and battery efficiency.
Chapter 18: Design Google Maps
Design global map navigation and routing engine. Covers vector tile hierarchies, shortest-path road algorithms (Dijkstra/A*), real-time traffic overlay, and adaptive rerouting.
Chapter 19: Distributed Message Queue
Architect a high-throughput distributed commit log message queue. Covers partitions, zero-copy network transfer (sendfile), consumer group rebalancing, and replication protocols.
Chapter 20: Metrics Monitoring and Alerting System
Architect real-time infrastructure monitoring platform tracking billions of telemetry metrics daily. Covers time-series database design, push vs pull collection, and alert evaluation.
Chapter 21: Ad Click Event Aggregation
Design real-time advertising analytics platform aggregating ad clicks with exactly-once processing, tumbling window rollups, out-of-order event watermarking, and click fraud filtering.
Chapter 22: Hotel Reservation System
Architect reservation engine preventing double-booking under concurrency. Covers optimistic vs pessimistic locking, 2-phase commits, inventory countdowns, and reconciliation.
Chapter 23: Distributed Email Service (Gmail)
Design internet-scale email service like Gmail. Covers SMTP/IMAP protocol handlers, distributed mail storage, spam/virus filtering pipelines, and real-time full-text inbox search.
Chapter 24: S3-like Object Storage
Design highly durable object storage system (11 nines durability). Covers block data nodes, erasure coding vs replication, multipart uploads, and lifecycle garbage collection.
Chapter 25: Real-time Gaming Leaderboard
Architect real-time gaming leaderboard serving millions of active players. Covers Redis Sorted Sets (ZADD/ZRANK), skip lists, distributed score sharding, and periodic archive snapshots.
Chapter 26: Payment System
Design reliable, audit-compliant financial payment processing system. Covers idempotency keys, payment status state machines, double-entry ledgers, and automated reconciliation.
Chapter 27: Digital Wallet
Architect digital wallet handling millions of balance transfers per second. Covers in-memory ledgers, distributed transactional patterns (2PC, TCC, Saga), and Raft replication.
Chapter 28: Stock Exchange
Design ultra-low latency stock exchange order matching engine. Covers Limit Order Books, price-time priority matching, sequence order logs, and LMAX Disruptor memory ring buffers.
Additional FAANG Case Studies (9 Cases)
Classic production interview scenarios asked at Meta, Uber, Twitter, and Dropbox.
Design Pastebin — Text Paste Service
Design a Pastebin-like service where users upload plain text and receive a unique URL to share it. Covers key generation, object storage, metadata database, expiry, caching, and horizontal scaling.
Design Instagram — Photo Sharing Service
Design a photo-sharing social network like Instagram: users upload photos, follow others, and see a personalized news feed. Covers media storage, CDN, news feed generation, and database sharding.
Design Dropbox — Cloud File Storage
Design a cloud file storage service like Dropbox that syncs files across devices, handles large file uploads efficiently via chunking, and maintains version history. Covers block servers, delta sync, and metadata management.
Design Facebook Messenger — Real-Time Chat
Design a real-time messaging system like Facebook Messenger. Covers WebSocket-based real-time delivery, message storage in HBase, chat threading, and read receipts at massive scale.
Design Twitter — Social Network and Microblogging
Design Twitter: tweet posting, following, home timeline, trending topics, and search. Covers fanout-on-write vs read strategies, timeline caching, and sharding at 200M daily active users.
Design Twitter Search — Real-Time Tweet Search
Design a system that indexes and searches 500M tweets per day in near real-time. Covers distributed inverted indexes, dynamic indexing for freshness, and efficient storage of tweet search data.
Design Yelp — Proximity Search Service
Design a service that finds nearby places of interest (restaurants, businesses). Covers QuadTree-based spatial indexing, dynamic grid partitioning, and efficient radius search with ranking.
Design Uber — Ride-Sharing Service
Design a ride-sharing service like Uber: real-time driver tracking, ride matching, surge pricing, and route calculation. Covers the DriverLocationHT for sub-second location updates and QuadTree for proximity matching.
Design Ticketmaster — Event Ticketing System
Design a high-concurrency event ticketing system that prevents double-booking. Covers the ActiveReservationsService with LinkedHashMap, SERIALIZABLE transactions, and in-memory seat locking to handle flash sale traffic.
Foundational Concepts
Master these building blocks before tackling case studies.
Seminal Engineering Papers & Production Deep Dives
Foundational whitepapers and production engineering blogs referenced throughout these 28 chapters.
⚡ Rate Limiting & Fault Tolerance
🔄 Consistent Hashing & Sharding
🗄 Key-Value Stores & Storage Engines
Related Interview Prep
Frequently Asked Questions
What is system design in a software engineering interview?
System design interviews test your ability to design large-scale distributed systems. You are given an open-ended problem (e.g., "design Twitter") and must architect a scalable, reliable solution covering components like load balancers, databases, caches, message queues, and CDNs.
How do I prepare for system design interviews?
Study the foundational concepts (load balancing, caching, sharding, replication, CAP theorem, consistent hashing) then practice designing real systems (TinyURL, Twitter, YouTube, Uber). Use a structured approach: clarify requirements, estimate scale, design the high-level architecture, dive into components, and discuss trade-offs.
What companies ask system design questions?
System design interviews are standard at FAANG companies (Google, Amazon, Meta, Apple, Netflix) and most mid-to-large tech companies. They typically start for senior software engineer roles and above, though some companies ask them for mid-level engineers too.
What is the difference between vertical and horizontal scaling?
Vertical scaling (scale up) means adding more resources to a single server — more CPU, RAM, or disk. It has a hard limit and creates a single point of failure. Horizontal scaling (scale out) means adding more servers. It is more resilient but requires distributed systems techniques like load balancing and sharding.