TOPIC 12 · CAPSTONE

The System Design Interview Guide

Everything from Topics 01–11, weaponized. A repeatable five-step framework, the patterns interviewers expect, four worked examples end-to-end, estimation cheat sheets, and the mistakes that cost real offers.

All levels55 min read4 worked examples

At a Glance

The Five-Step Framework

A system design interview is 45 minutes of deliberate ambiguity — the interviewer wants to watch you impose structure on it. This framework always works:

1 · Requirements 5–10 min 2 · Estimation ~5 min 3 · High-level 10–15 min 4 · Deep dive 10–15 min 5 · Bottlenecks 5–10 min

Budget your 45 minutes deliberately — running out of time in step 3 is the most common failure.

1
Requirements — ask before you build

Functional: what must it do? (shorten URLs, redirect, custom aliases?) Non-functional: how well? (scale, latency targets, availability vs consistency, durability). Explicitly scope things OUT: "I'll skip analytics for now — fair?" Interviewers love hearing what you're not building.

2
Capacity estimation — napkin math

DAU → QPS (recall: 1M/day ≈ 12 QPS), read:write ratio, storage per year, bandwidth. The output isn't the number — it's the decisions it triggers: "600 reads/sec means caching matters more than write scaling."

3
High-level design — boxes and arrows

Client → DNS/CDN → LB → app servers → cache → DB → queue → workers. Draw the simple, correct skeleton first and trace one request through it aloud. Don't gold-plate yet.

4
Deep dive — pick your battlefield

The interviewer (or you) picks 1–2 components: DB schema and shard key, the API contract, the core algorithm, the cache strategy. This is where Topics 06–08 knowledge gets spent.

5
Bottlenecks & trade-offs — what breaks at 10×?

Single points of failure, hot shards, cache stampedes, the DB write ceiling. Name each, propose the fix, state its cost. Closing strong here is the difference between "solid" and "senior."

Patterns to have loaded in cache: horizontal scaling + LB (05), CDN for static (04), cache-aside with Redis (06), read replicas → sharding (07), async via queues (08), and stateless services so any server handles any request (09). Most questions are these six blocks rearranged.

The Estimation Cheat Sheet

Burn these numbers in. Not to recite them — to derive architectural decisions from them automatically.

Starting pointConversionDesign implication
1M DAU≈ 12 QPS (assume 8-hr active day)Single app server likely sufficient
10M DAU≈ 116 QPSCaching needed; add read replicas
100M DAU≈ 1,160 QPSDB sharding + CDN essential
1B DAU≈ 11,600 QPSMulti-region; geo-routing; Kafka-scale queues
1 tweet, 100M followers100M fan-out writesHybrid fan-out on read for celebrities
100 bytes/msg × 100M msgs/day10 GB/day = 3.6 TB/yrObject storage, not DB rows
Photo 200 KB × 1B photos200 TB totalS3/GCS + CDN; no database
Video 1 GB × 1M uploads/day1 PB/day rawDedicated media pipeline; async transcoding
Read:write = 100:1Cache-aside + read replicas; writes are cheap
SSD random read≈ 100 µsIn-memory cache = 1000× faster (≈ 100 ns)
The decision the number triggers is what matters

"I calculated 1,200 QPS on reads" is useless by itself. "1,200 QPS means a cold Postgres can handle it but we'll hit CPU limits around 50% load — so I'll add Redis cache-aside to absorb the hottest 10% of data and give us headroom" earns points.

The Six-Block Starter Kit

Almost every system design question is answered by assembling the same six building blocks in different orders. Internalize them; reach for them before reaching for anything fancy.

Client Web / Mobile CDN / DNS Topic 04 Load Balancer Topic 05 App Servers Stateless Topic 10 Cache Redis · Topic 06 Database Topic 07 Queue Kafka · Topic 08 Workers Async consumers

This skeleton answers URL shortener, chat, social feed, ride-sharing, and video streaming. Rearrange the blocks; the blocks stay the same.

Worked Example 1 — URL Shortener (TinyURL)

Requirements. Shorten a long URL to ~7 characters; redirect fast; links live for years; optional custom aliases. Non-functional: redirects <50 ms and highly available. Read-heavy: assume 100:1 reads to writes.

Estimates. 10M new URLs/month ≈ 4 writes/sec; 1B redirects/month ≈ 400 reads/sec. Storage: 10M/month × ~500 bytes ≈ 5 GB/month — 60 GB/year. This is a latency and availability problem, not a big-data problem. Say that out loud — it's the key insight.

The algorithm. Use a counter + base62 encoding (a–z, A–Z, 0–9). 627 ≈ 3.5 trillion codes — enough forever. Avoid hashing the URL alone (collisions, and two users shortening the same URL get the same code — fine until one wants analytics).

ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

def encode(n: int) -> str:
 s = ""
 while n:
 s = ALPHABET[n % 62] + s
 n //= 62
 return s or "a"

# DB: urls(id BIGINT PK, short_code CHAR(7) UNIQUE,
# long_url TEXT, created_at, expires_at)

Design. POST /shorten → app server gets a unique ID (a DB sequence, or pre-allocated ID ranges per server — Flickr's ticket-server trick), encodes it, stores the row. GET /{code} → check Redis (cache-aside; hot links are wildly skewed) → on miss, read DB, fill cache, reply 302 if you want analytics on every hit, 301 if not.

Scale & trade-offs. Cache absorbs ~90% of redirects; replicate DB for reads; CDN/edge can serve redirects. Mention abuse (rate-limit creation, blocklist malicious domains) and expiry cleanup as a background job (Topic 08).

DecisionOption AOption BWinner & reason
ID generationDB auto-incrementPre-allocated ranges per serverB — removes counter bottleneck at scale
Redirect code301 Permanent302 Temporary302 if analytics needed (browser won't cache)
Cache strategyCache-aside (Redis)Write-throughCache-aside — write path is cold, only reads matter
Primary storePostgres (SQL)DynamoDB (NoSQL)SQL — ACID enforces unique constraint on short_code

Worked Example 2 — Social Feed (Twitter / Instagram)

The crux. Home timeline = merged recent posts from everyone you follow. Two opposite strategies:

FW

Fan-out on write (push)

When Alice posts, push the post ID into every follower's pre-computed timeline list in Redis. Reading your feed is one cheap fetch. But a celebrity with 100M followers triggers 100M writes per post.

FR

Fan-out on read (pull)

Store posts once; when Bob opens the app, pull recent posts from all 800 people he follows and merge. Writes are O(1); every feed read is an 800-way merge. Slow for active readers.

Fan-out on writeFan-out on readHybrid
Write costO(followers) per postO(1)O(followers), capped
Read costO(1) — precomputedO(following) mergeO(1) + celebrity merge at read time
Celebrity problem100M timeline writesFineMerge celebrities at read time only
Production useMost users' postsRarely aloneTwitter, Instagram feed system

The hybrid. Fan-out on write for 99.9% of users. For celebrities (follower count above a threshold), skip fan-out — instead merge their fresh posts at read time. Each user's feed = pre-computed list + live merge of a handful of celebrities they follow. The threshold is a tunable knob.

Supporting cast. Posts in a sharded store keyed by post ID; timelines in Redis (lists capped ~800 entries); fan-out is async via queues (Topic 08) — a post appearing in feeds 2 seconds late is invisible, which is eventual consistency (Topic 03) earning its keep. Media on a CDN (Topic 04).

Why interviewers love this question

It has no right answer — it has a spectrum, and your job is to find the hybrid and justify the threshold. "Read-heavy favors precomputation; extreme fan-out breaks it; split users by fan-out cost" demonstrates the whole skill being tested.

Worked Example 3 — Chat System (WhatsApp / Slack)

Requirements. 1:1 and group messaging; delivery receipts (sent/delivered/read); offline message storage; scale to 500M DAU. 500M DAU × 40 msgs/day ≈ 230K writes/sec. Each message ~100 bytes → ~2 TB/day storage.

The protocol choice. Chat is bidirectional and persistent — this is the textbook WebSocket use case (Topic 09). One TCP connection per client, kept alive; server pushes messages without polling. For offline users, store messages and deliver on reconnect.

Alice WebSocket Chat Server 1 WS connections session registry Kafka msg broker Chat Server 2 Bob's session online Bob online MongoDB offline queue Redis user → server session map

Kafka decouples senders from receivers. Redis session map routes messages to the right chat server. MongoDB holds offline messages with TTL.

Key decisions to voice. (1) Session registry in Redis: when Chat Server 1 gets Alice's message for Bob, it looks up Bob's server in Redis, then routes directly — or publishes to Kafka if Bob is on a different server. (2) Offline storage: if Bob is offline, messages go to MongoDB with a TTL; delivered on reconnect. (3) Message ordering: monotonically increasing IDs per conversation (Snowflake ID or sequence per chat room). (4) Group chat: same fan-out problem as Twitter — same hybrid approaches apply.

Trade-off to name: WebSocket servers are stateful (Bob must reconnect to a server that can reach him). Use sticky sessions (Layer 4 LB by IP hash) or put routing state in Redis so any server can route to any other. The Redis approach is cleaner at scale.

Worked Example 4 — Distributed Rate Limiter

Requirements. Limit each API key to N requests per window (100/min); return 429 with Retry-After when exceeded; add <5 ms latency; work across a fleet of API servers (a per-server counter would let clients get N × servers requests).

Algorithm: token bucket. Each key gets a bucket: capacity 100, refilling at 100/60 tokens per second. A request spends a token; an empty bucket means 429. Buckets allow honest bursts while capping the sustained rate — and need only two numbers stored per key: token count and last-refill timestamp.

-- KEYS[1]=bucket key · ARGV: capacity, refill_rate, now (unix seconds)
local tokens = tonumber(redis.call('HGET', KEYS[1], 'tokens') or ARGV[1])
local last = tonumber(redis.call('HGET', KEYS[1], 'ts') or ARGV[3])
tokens = math.min(ARGV[1], tokens + (ARGV[3] - last) * ARGV[2])
if tokens < 1 then return 0 end -- 429 Too Many Requests
redis.call('HSET', KEYS[1], 'tokens', tokens - 1, 'ts', ARGV[3])
return 1 -- allowed

Trade-offs to volunteer. Redis is now on the hot path — if it dies, do you fail open (allow everything; risk abuse) or fail closed (block everything; outage)? Most choose fail-open with alerts. At extreme scale, approximate local buckets sync to Redis periodically — slightly leaky limits for much lower latency. Enforce at the API gateway (Topic 10) — one place, every service protected.

AlgorithmBurst handlingMemory costBoundary burst?
Token bucketAllows bursts up to capacity2 values/keyNo
Leaky bucketNo burst — smooths outputQueue per keyNo
Fixed window counter2x burst at window edge1 counter/keyYes
Sliding logPrecise, no boundary burstO(N) per keyNo
Sliding window counterNear-precise, O(1) memory2 counters/keyMinimal

Pattern Trigger Phrases — Cheat Sheet

When the interviewer says the magic words, reach for these patterns automatically.

Trigger phraseReach forTopic
"very fast reads, slight staleness OK"Cache-aside with Redis + TTL06
"don't lose a single record"WAL + synchronous replication + at-least-once delivery07, 08
"millions of users, one region"CDN + edge caching + geo-routing LB04, 05
"global low latency"Multi-region active-active + CRDTs02, 03
"handle traffic spikes"Queue + worker pool + auto-scaling08
"decouple services"Event queue (Kafka/SQS) + idempotent consumers08, 10
"100M+ rows, single table hot"Horizontal sharding by user_id hash07
"real-time bidirectional comms"WebSocket with session routing in Redis09
"server-push to many clients"Server-Sent Events; Kafka fan-out to push servers08, 09
"cross-service transaction"Saga pattern (orchestrated via Temporal)10
"secure internal service comms"mTLS via service mesh (Istio / Linkerd)10, 11
"complex access patterns on large data"DynamoDB / Cassandra with pre-modeled access paths07

Interview Q&A

Questions that have surprised candidates — click to reveal strong answers.

Five-nines is ~5 minutes of downtime per year. You can't achieve it with one of anything. Checklist: (1) No single points of failure — every layer redundant: multiple app servers behind a LB, multi-AZ database, replicated cache. (2) Active-active multi-region — one region dying should be invisible. (3) Health checks + auto-restart — bad instances removed from rotation in <30s. (4) Graceful degradation — serve stale cache when the DB is down. (5) Chaos engineering — confirm the redundancy actually works before you need it. (6) Zero-downtime deploys — blue-green or canary releases. Trade-off: active-active requires conflict resolution (CRDTs or last-write-wins), which may sacrifice strict consistency.

In order of increasing complexity: (1) Connection pooling (PgBouncer) — removes per-connection overhead. (2) Write batching — batch inserts, async writes via queue. (3) Vertical scaling — more CPU/RAM, faster SSDs. (4) Functional partitioning — put users and orders on separate DB clusters. (5) Horizontal sharding — shard by user_id hash; each shard owns a subset. (6) Write-optimized store — Cassandra's LSM-tree is faster than B-tree for heavy writes. Give the choice a number: "At 10K writes/sec, sharding into 16 shards gives 625 writes/sec/shard — well within Postgres's sweet spot."

SQL by default. Choose NoSQL when: (1) Schema-less flexibility — MongoDB for user profiles with varying fields. (2) Massive horizontal write scale — Cassandra for write-heavy time-series at 100K+ writes/sec. (3) Key-value at ultra-low latency — DynamoDB for sessions and shopping carts. (4) Graph relationships — Neo4j for social graphs or fraud rings. (5) Full-text search — Elasticsearch. The answer interviewers want: "SQL by default; NoSQL when I can predict access patterns up front, because NoSQL requires pre-modeling your queries and punishes ad-hoc joins."

SQL LIKE with a leading wildcard (LIKE '%foo') can't use a B-tree index — full table scan. Add a dedicated search index. (1) Elasticsearch: an inverted index mapping terms to document IDs. Near-real-time (≈1s lag). (2) Sync strategy: dual-write (simple, risks partial failure), change data capture from WAL via Debezium → Kafka → ES consumer (reliable, slight lag), or periodic batch reindex (simple but stale). (3) Relevance tuning: BM25 scoring, field boosts, fuzzy matching, synonyms. (4) Scaling: shards and replicas — same CAP considerations as any distributed store. Elasticsearch is eventually consistent and not a source of truth — SQL DB is.

Mistakes That Cost Offers

Jumping to microservices / Kafka before requirements

Opening with "I'd use a microservices architecture with Kafka and Kubernetes" before requirements are clear signals cargo-cult engineering. Start simple. Earn complexity by pointing to a number that justifies it: "At 50K events/sec the queue becomes a bottleneck — that's when I'd introduce Kafka."

Silent design

Drawing boxes without narrating is a silent death — the interviewer can't evaluate what they can't see. Verbalize every choice and every rejected alternative. "I'm choosing Redis over Memcached here because I need sorted sets for the leaderboard, not just key-value."

Estimation without decisions

Calculating 1,200 QPS and moving on leaves points on the table. The number must trigger a decision: "1,200 reads/sec means a single DB can handle it, but I'll add Redis cache-aside to absorb the hottest 10% and give us 5× headroom for growth."

No trade-offs named

Every choice has a cost. "I'll use a cache" must be followed by "at the cost of up to N seconds of staleness." "I'll shard" must be followed by "which limits cross-shard joins and requires the shard key in every query." Naming trade-offs is what separates senior from mid-level.

Ignoring failure modes

Every system fails. Name it: what if the DB is down? What if a queue consumer crashes mid-processing? What if a cache server goes cold? Name the failure, name the mitigation (retry, fallback, idempotency key), and name the trade-off of that mitigation.

Interview Mindset & Final Preparation

Clearing a system design interview is as much about how you think and communicate as it is about knowing the right patterns. Interviewers are evaluating four things simultaneously: clarity of thought, depth in trade-offs and technical decisions, communication and collaboration skills, and structured problem-solving. Keeping those four lenses in mind shapes every minute of your session.

What Interviewers Are Really Measuring

The Right Mindset Going In

The 4-Step Repeatable Framework

Use this framework every time — it keeps responses structured and easy to iterate on when the interviewer adds new constraints:

Handling Ambiguity and Evolving Scope

Interviewers add ambiguity on purpose. When the scope changes mid-interview: reassess bottlenecks, communicate how your design needs to shift, and reason through the impact. Practice decomposition — break large problems into services, flows, or layers, then zoom into specific parts (storage, API, auth) when the interviewer signals interest.

Communicating Trade-offs Effectively

Building Interview Fluency

Final thought: You are not just preparing for interviews — you are becoming a system thinker. The habits you build here (structured decomposition, trade-off reasoning, clear communication) will serve you throughout your engineering career.

Case Study: Ticketing System (BookMyShow)

Design an online platform where users can browse events, view real-time seat availability, book and pay for tickets, and receive confirmation — while the system handles high concurrency, flash sales, and the critical requirement of never double-booking a seat.

Functional Requirements:

Non-Functional Requirements:

Scale Estimates: 1M DAU, 100K concurrent users at peak, ~500K bookings/day (~6/sec average, up to 2,000/sec during a major release). Primary bottlenecks: race conditions on seat allocation, write pressure on the booking DB, payment API latency, and notification queue buildup.

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Deploy on Kubernetes with Horizontal Pod Autoscaling; partition Kafka topics by event ID; use read replicas for the event catalog; deploy Redis Cluster for seat inventory; route to the nearest region via a global load balancer. For extremely popular events, queue incoming booking requests and process them in strict order to eliminate race conditions entirely.

Case Study: News Feed (Twitter / Facebook)

Design a social news feed where users post updates and followers see a personalized, real-time timeline. The core challenge is fan-out: one tweet from a user with one million followers must propagate instantly, efficiently, and without duplicates — at a scale of 500M users and 1B tweets per day.

Functional Requirements:

Non-Functional Requirements:

The Fan-Out Problem: When a user posts, every follower's timeline must update. Two models exist:

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Shard Cassandra by user ID; partition Kafka topics by user ID for ordered fanout; use Kubernetes HPA on fanout workers; geo-replicate media via CDN edge nodes; rate-limit writes per user at the API Gateway to prevent abuse and write storms.

Case Study: Notification System

Design a general-purpose notification system that accepts events from upstream services (orders, auth, marketing) and reliably delivers messages to users across multiple channels — Email, SMS, Push, and In-App — while respecting user preferences, handling retries, and operating at 100M+ notifications per day.

Functional Requirements:

Non-Functional Requirements:

High-Level Architecture (Event Flow):

Key Design Decisions:

Scaling Strategy: Horizontally scale channel workers independently (SMS workers may need fewer instances than email); use Kafka consumer groups for parallel processing; use KEDA (Kubernetes Event-Driven Autoscaling) to scale workers based on queue depth; store templates in S3 and cache aggressively; archive delivery logs in cold storage after 30 days.

Case Study: Rental Platform (Airbnb)

Design an online rental marketplace where hosts list short-term accommodations and guests search, book, and pay for stays — with real-time availability, calendar synchronization, media-heavy listings, and a global user base of millions.

Functional Requirements:

Non-Functional Requirements:

Scale Estimates: 5M DAU, 100K concurrent users at peak; 50M+ listings (250 GB in PostgreSQL); 1M bookings/day (~1 TB/year); 500 TB of media storage (avg. 10 images × 1 MB × 50M listings); 1M payment transactions/day.

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Horizontally scale each microservice on Kubernetes; use Azure/AWS multi-region deployment with load balancers; replicate PostgreSQL across availability zones; partition Elasticsearch by listing geography; use Redis cluster for session and search caches; enable CDN caching for media with long TTLs.

Case Study: Auction Platform (eBay)

Design a real-time auction platform where sellers list items with a timed auction window, bidders compete with live bid updates, and the system determines a winner and processes payment when the auction closes — all with sub-second bid acknowledgment and fairness guarantees even during last-second bidding frenzies.

Functional Requirements:

Non-Functional Requirements:

Scale Estimates: 5M registered users, 500K DAU; 1M ongoing auctions; 10M bids/day (~115/sec average); peak of 10K concurrent users on one popular auction; 100K payment transactions/day.

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Partition bid processing by auction ID across Kafka partitions; horizontally scale WebSocket servers behind a load balancer (sticky sessions or Redis Pub/Sub for cross-server fan-out); use PostgreSQL with row-level locking for bid writes; cache auction listings in Redis; auto-scale API and bid services on Kubernetes based on concurrent auction count.

Case Study: Cloud Storage (Dropbox / Google Drive)

Design a cloud file storage system where users can upload files of any type, sync them across all their devices in near real-time, share with collaborators, and access previous versions — at a scale of 10M active users, 5B files, and 10 petabytes of stored data.

Functional Requirements:

Non-Functional Requirements:

Scale Estimates: 10M users × 500 files average = 5B total files; average file size 2 MB → 10 PB total; 2K uploads/sec peak; 10K sync events/sec peak.

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Shard the Metadata Service by user ID; replicate object storage across multiple availability zones (S3 handles this natively); scale Upload Service workers horizontally on Kubernetes; use Redis Cluster for metadata caching; implement lifecycle policies (move files to cold storage after 90 days of inactivity) to control cost at petabyte scale.

Case Study: Video Sharing Platform (YouTube)

Design a video sharing platform where 100M users upload 10M videos per day, 500M daily views are served globally, and each video must be transcoded into multiple resolutions and delivered via CDN with adaptive bitrate streaming — while keeping upload-to-playback latency low and storage costs manageable at petabyte scale.

Functional Requirements:

Non-Functional Requirements:

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Auto-scale FFmpeg encoding workers on GPU instances (Kubernetes + GPU node pools); partition Kafka encoding topics by video ID; shard PostgreSQL metadata by video ID; geo-replicate CDN manifests for global low-latency delivery; use read replicas for metadata queries; implement CDN cache warming for new viral videos.

Case Study: Search Engine (Google Search)

Design a web-scale search engine that crawls billions of web pages, builds an inverted index for fast keyword lookup, ranks results by relevance using TF-IDF and PageRank, and responds to 50K queries per second with under 200ms end-to-end latency — while keeping the index fresh as the web changes.

Functional Requirements:

Non-Functional Requirements:

Scale Estimates: 100M pages for MVP (100B for full scale); 10M active users; 50M queries/day; peak 1,000–2,000 QPS. Crawl target: 100M pages in 7 days → 170 pages/sec with 500 workers.

Core Components:

Key Design Decisions:

Scaling Strategy: Horizontally scale crawler workers (partition by domain); shard inverted index by term hash with replication factor 3; cache top queries in Redis with TTL; use Elasticsearch as an alternative to custom inverted index for smaller-scale implementations; store raw content in S3 with lifecycle policies; use dedicated high-memory nodes for ranking engine.

Case Study: E-Commerce Marketplace (Amazon)

Design a multi-vendor e-commerce platform where buyers browse and purchase products, sellers manage inventory and listings, and the system handles secure checkout, payment processing, fraud detection, and order management — without ever overselling inventory, even during flash sales.

Functional Requirements:

Non-Functional Requirements:

High-Level Architecture:

Key Design Decisions:

Scaling Strategy: Deploy each microservice independently on Kubernetes with HPA; shard PostgreSQL by user ID for user/order data and by product ID for catalog/inventory; use Elasticsearch cluster with multiple shards for product search; implement CDN for product images; scale Kafka consumer groups for notification workers based on queue depth; use managed cloud services (AWS RDS, ElastiCache, SQS) to reduce operational overhead.

Case Study: Collaborative Document Editor (Google Docs)

Design a web-based collaborative document editor where multiple users can edit the same document simultaneously, see each other's changes in real-time with under 100ms latency, and never see a conflicted or corrupted document state — backed by version history, access control, and autosave at a scale of 10M+ daily active users.

Functional Requirements:

Non-Functional Requirements:

The Core Challenge — Conflict Resolution: When Alice inserts "Hello" at position 5 and Bob simultaneously deletes the character at position 3, the naive approach (last-write-wins) produces a corrupted document. Two algorithmic approaches solve this:

High-Level Architecture:

Real-Time Sync Flow:

Key Design Decisions:

Scaling Strategy: Route documents to Collab Service instances by document ID (consistent hashing); scale Collab Service horizontally with Redis Pub/Sub for cross-instance operation fan-out on shared documents; use Kubernetes HPA based on active WebSocket connections; partition Kafka topics by document ID for ordered operation processing; archive version history to S3 after 90 days; use PostgreSQL read replicas for metadata queries.

Further Reading

Final Tips

Archie's send-off

You now have the whole toolbox: scale math (01), CAP instincts (02), consistency patterns (03), DNS & CDNs (04), load balancing (05), caching (06), databases (07), queues (08), protocols (09), microservices (10), and security (11). System design isn't memorization — it's knowing which trade-off to reach for. Go build something beautiful.

Final Boss Question

Interviewer: "Design Instagram." What's the strongest possible first move?

Always. Requirements before architecture — "Instagram" could mean photo upload, feed generation, stories, DMs, or explore. Scoping the problem IS the first demonstration of system design skill. Estimation is the right second move.
Try It

Interactive: Back-of-Envelope Estimator

The first thing interviewers want to see is napkin math. Set your DAU, requests per user, and response size — the estimator computes RPS, bandwidth, storage, and server count in real time.