System Design
The building blocks of large systems and the classic interview case studies, drawn out step by step.
System design rounds test whether you can turn a vague product ("design WhatsApp") into a clear architecture and defend every choice. Start with the fundamentals and the building blocks, then work through the case studies. Each one follows the same interview framework, with diagrams for every stage.
- Run a 45-minute design interview with a repeatable framework
- Estimate traffic, storage and bandwidth on the back of an envelope
- Choose between SQL and NoSQL, caches, queues, CDNs and sharding strategies, and explain the trade-offs
- Design URL shorteners, chat apps, feeds, ride hailing, video streaming and more
Fundamentals
The interview framework, estimation, scaling, availability and consistency.
How a System Design Interview Works
A repeatable four-step framework for any design question: requirements, estimates, high-level design, deep dives.
Back-of-the-Envelope Estimation
Turn user counts into requests per second, storage and bandwidth in a minute, using powers of ten and a few numbers worth memorising.
Scaling From One Server to Millions of Users
Vertical vs horizontal scaling, stateless app servers, read replicas and caches: how a design grows step by step.
Availability, Reliability and the Nines
What 99.9% vs 99.99% actually means, how redundancy and failover remove single points of failure, and how SLAs are set.
CAP Theorem and Consistency Models
Why a partitioned system must choose between consistency and availability, and what strong, eventual and read-your-writes consistency mean.
Building blocks
DNS, CDNs, load balancers, caches, databases, sharding, queues, rate limiters and APIs.
DNS and CDNs
How a domain name becomes an IP address, and how content delivery networks serve files from a server near the user.
Load Balancers
Spreading traffic across servers: L4 vs L7, balancing algorithms, health checks, sticky sessions and avoiding the load balancer as a single point of failure.
Caching
Where to cache, cache-aside vs write-through vs write-back, eviction policies, invalidation, and the stampede and hot-key problems.
Choosing a Database: SQL, NoSQL and Indexes
Relational vs key-value, document, wide-column and graph stores, how indexes work, and how to pick based on access patterns.
Replication, Sharding and Consistent Hashing
Copying data for availability and reads, splitting it for scale, choosing shard keys, and why consistent hashing makes resharding cheap.
Message Queues and Asynchronous Processing
Decoupling services with queues and logs (RabbitMQ, SQS, Kafka): delivery guarantees, idempotent consumers, fan-out and back-pressure.
Rate Limiting
Protecting services from abuse and overload with token buckets, leaky buckets and sliding windows, implemented centrally with Redis.
APIs and Real-Time Communication
REST, gRPC and GraphQL; pagination and idempotency; and polling vs long polling vs WebSockets vs server-sent events for live updates.
Blob Storage and Search
Where files, images and videos really live (object storage), and how full-text search works with inverted indexes.
Monoliths, Microservices and Observability
When to split a system into services, what an API gateway does, and how logs, metrics and traces let you run it.
Case studies
Classic interview questions designed end to end.
Design a URL Shortener (like bit.ly)
The classic warm-up question: short-code generation, a read-heavy redirect path with caching, and analytics without slowing redirects.
Design a Chat App (like WhatsApp)
One-to-one and group messaging with WebSockets, message delivery and read receipts, offline users, and storage for billions of messages.
Design a News Feed (like Instagram or X)
Fan-out on write vs fan-out on read, the celebrity problem, feed ranking, and caching timelines for hundreds of millions of users.
Design a Notification System
Sending push, SMS and email notifications reliably at scale: queues per channel, user preferences, deduplication, retries and rate limits.
Design a Ride-Hailing App (like Uber or Ola)
Tracking millions of moving drivers, finding the nearest ones with geohashes or quadtrees, matching riders to drivers, and handling trips safely.
Design a Video Streaming Platform (like YouTube)
Upload and transcoding pipelines, adaptive bitrate streaming with HLS/DASH, CDNs for delivery, and counting views at scale.
Design a Ticket Booking System (like BookMyShow)
Seat maps, temporary seat holds with expiry, preventing double booking under heavy concurrency, payments, and surviving a blockbuster's ticket rush.
Design Search Autocomplete
Type-ahead suggestions in milliseconds: tries with cached top-k, building them offline from query logs, and serving from memory near users.
Design a Web Crawler
Crawling billions of pages politely: the URL frontier, per-host politeness queues, deduplication with Bloom filters and content hashes, and traps.
Design a Payment System (like Razorpay checkout)
Taking money safely: idempotency, the payment state machine, talking to banks and UPI, webhooks, double-entry ledgers and reconciliation.