Big Picture: The Journey of One Request
How a large-scale website is built: all the important System Design topics (Amazon / Flipkart / Netflix scale). This guide has 64 topics, 9 parts and 390 tools explained. Every topic covers: why it is used, how it works, which tools, the difference between tools, and a real-world example. At the end there is a quick revision cheat-sheet.
The journey of one request: the whole picture first
When you press 'Buy Now' on Amazon, the request takes this path. Every box is a topic explained in detail in this guide.
- 1.User (Browser / App)
- 2.DNS
- 3.CDN
- 4.WAF / DDoS
- 5.Load Balancer
- 6.API Gateway (Auth + Rate Limit)
- 7.Microservices
- 8.Cache (Redis)
- 9.Database (SQL / NoSQL)
- 10.Message Queue / Kafka
- 11.Workers (email, search index, analytics)
The request starts at the user and goes through DNS, CDN, WAF, LB, gateway, services, cache, DB, queue and workers
What always runs alongside
- Logging
- Monitoring & Alerting
- Tracing
- Security (TLS, secrets)
- CI/CD
- Kubernetes
- Auto-scaling
- Backups & Disaster Recovery
How to read this guide
- Start with Part 1: how traffic comes in.
- Then Caching & Database.
- Then Async (Queue/Kafka/Pub-Sub).
- Then Reliability, Security, DevOps.
- Last come Advanced topics (Networking, Performance, Data) and Business (Fraud, Compliance, Cost).
- For seeing each design end-to-end there are separate Case Studies.
- Every topic has a comparison table that shows the difference between tools at a glance, and a step-by-step real-world example.
Contents
| Part | Topics |
|---|---|
| Part 1: The Entry Gate for Traffic | 1 DNS & GeoDNS; 2 CDN; 3 Load Balancer (L4 vs L7, algorithms); 4 Reverse Proxy & API Gateway; 5 Rate Limiting & Throttling; 6 Scaling (Vertical vs Horizontal, Auto-scaling); 7 Stateless Servers & Session Management; 8 DDoS Protection, WAF & Bot Protection |
| Part 2: Caching & Database | 9 Caching (Redis vs Memcached vs Local Cache; Cache-aside, Write-through, Write-back, Read-through); 10 Cache Eviction, Invalidation, TTL & Cache Stampede; 11 SQL vs NoSQL; 12 Database Replication & Read Replicas; 13 Sharding / Partitioning; 14 Consistent Hashing; 15 Database Indexing & Query Optimization; 16 CAP Theorem, PACELC & Consistency Models; 17 Transactions (ACID & Distributed Transactions: 2PC, Saga, Outbox) |
| Part 3: Storage, Search & Data | 18 Object / Blob Storage vs Block vs File Storage; 19 Image & Video Processing / Streaming; 20 Search Engine (Full-Text Search); 21 Autocomplete / Typeahead; 22 Data Warehouse, ETL & Big Data Analytics; 23 Recommendation System & A/B Testing |
| Part 4: Async Communication & Services | 24 Message Queue; 25 Pub/Sub vs Message Queue vs Event Streaming; 26 Event Streaming with Kafka; 27 Background Jobs & Task Scheduling; 28 Real-time Communication (WebSocket vs SSE vs Long Polling); 29 Notification System; 30 Monolith vs Microservices; 31 API Design & Service Communication (REST vs gRPC vs GraphQL); 32 Service Discovery & Configuration Management |
| Part 5: Reliability & Correctness | 33 Timeouts, Retries, Exponential Backoff & Circuit Breaker; 34 Idempotency & Exactly-once processing; 35 High Availability, Failover, Multi-Region & Disaster Recovery; 36 Distributed Locking & Leader Election; 37 Unique ID Generation; 38 Concurrency Control (Inventory, Flash Sale & Overselling); 39 Backpressure, Load Shedding & Graceful Degradation; 40 Payment System Design |
| Part 6: Security & Observability | 41 Authentication & Authorization; 42 Encryption, HTTPS/TLS & Secrets Management; 43 Centralized Logging; 44 Monitoring, Metrics & Alerting; 45 Distributed Tracing |
| Part 7: Deployment, DevOps & Planning | 46 Containers & Orchestration; 47 CI/CD & Deployment Strategies; 48 Infrastructure as Code (IaC); 49 Load Testing, Performance Testing & Chaos Engineering; 50 Capacity Planning & Back-of-the-envelope Estimation |
| Part 8: Networking, Performance & Advanced Data | 51 TCP vs UDP, HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC), Keep-Alive & Connection Reuse; 52 Web Performance (Compression, Browser Caching Headers, Lazy Loading, SSR vs CSR vs SSG); 53 CQRS & Event Sourcing; 54 Consensus & Cluster Coordination (Raft, Paxos, Quorum N/R/W, Gossip Protocol); 55 Probabilistic Data Structures (Bloom Filter, HyperLogLog, Count-Min Sketch); 56 Geo-spatial & Location Services (Geohash, Quadtree, S2/H3); 57 Specialised Databases (Time-series, Graph, NewSQL, Wide-column, Polyglot Persistence); 58 Zero-downtime Database Migration & Schema Changes; 59 BFF (Backend for Frontend) & Mobile Backend; 60 Large File Upload & Download |
| Part 9: Business, Compliance & Cost | 61 Fraud Detection & Risk Engine; 62 Compliance & Data Privacy (DPDP, GDPR, PCI-DSS, Data Localisation); 63 Multi-tenancy & Data Isolation; 64 Cloud Cost Optimization / FinOps |