
Welcome: What System Design Is and Where Your Code Lives
Meet FestSnap, the photo-sharing app we’ll grow from one tiny server to millions of users. You’ll see how this course works and why we only add a component when something breaks. Then you’ll learn what a server really is, why your laptop can’t host your app, and what runs on our first ₹800-a-month machine.
Three Failures That Shape Every System
FestSnap gets popular and breaks three times. First the server runs out of CPU and memory, which leads us to load balancing. Then the database is crushed by repeated queries, which leads us to caching. Finally the disk dies on the busiest night, which leads us to replication and backups. These three failures map the rest of the course.
HLD vs LLD (+ Interview Byte: Design a URL Shortener)
Learn the difference between high-level design (the big map of components) and low-level design (what happens inside one box). You’ll also see why you should always start wide, then go deep. Then try your first Interview Byte, “Design a URL shortener”: the common trap and the three-step structure interviewers look for.
Functional vs Non-Functional Requirements
Split any product into what it does (functional requirements) and how well it must do it (non-functional requirements). We cover the big five for FestSnap: latency, availability, scalability, durability and consistency. You’ll also see why a photo app and a payments app with the same features need very different designs.
Five Questions to Ask Before You Design (+ Interview Byte: Instagram)
Ask the five questions engineers use before drawing anything:
Who are the users?
How much traffic?
Read- or write-heavy?
How much data?
What matters when things fail?
We work out real estimates for FestSnap, then tackle “Design Instagram” in an Interview Byte.
Monolith vs Microservices
Understand why a monolith is the right start for most new apps, and the pains that appear as a team grows. See what microservices fix, and the price they bring: network calls, retries, debugging across services and keeping data consistent. You’ll leave with a clear, honest rule for when to split.
Vertical vs Horizontal Scaling (+ Interview Byte: Microservices?)
Compare scaling up (a bigger machine) with scaling out (more machines behind a load balancer). You’ll learn the three problems with vertical scaling and the one condition horizontal scaling needs. Then answer “Should we use microservices?” in an Interview Byte, with trade-offs instead of buzzwords.
How a Request Travels: DNS to Database and Back
Follow one tap on Priya’s phone through every step:
DNS lookup and the HTTPS handshake
The load balancer and the app server
Cache and database
Photos from a CDN, and the response back
Once you can picture this path, you can find the bottleneck in any slow app.
Load Balancers: Algorithms and Health Checks
Open up the load balancer. Learn round robin, weighted round robin, least connections and IP hashing, and how health checks quietly remove broken servers. You’ll also see how rolling deploys avoid downtime, why load balancers run in pairs, and the difference between layer 4 and layer 7 load balancing.
Stateless vs Stateful Servers
Solve FestSnap’s random-logout bug and learn what session state is. Compare three fixes: sticky sessions, a shared Redis session store and signed tokens (JWT). You’ll also see why uploaded files are state too, how stateless servers make autoscaling possible, and where state should live.
Interview Byte: Random Logouts + Hands-on: Build a Load Balancer
Answer “Users get logged out when we add servers. Why, and how would you fix it?” using cause, options, trade-offs and a decision. Then build a real load balancer with Nginx and Docker: watch round robin live, kill a server and try weighted routing. The lab guide is attached as a resource.
Data Modeling: Start From Access Patterns
Learn the most important idea in data design: model data around how it’s used, not just what it is. We list FestSnap’s access patterns, design the tables and keys, and decide when to denormalise. Then we compare two ways to build the feed: on read or on write.
SQL vs NoSQL (+ Interview Byte)
Understand what SQL databases do best (joins, transactions, ACID) and where they struggle. Meet the four NoSQL families (key-value, document, wide-column and graph) and the eventual-consistency trade-off. You’ll see why FestSnap uses more than one database, then answer “SQL or NoSQL?” like an engineer in an Interview Byte.
Database Indexes + Hands-on: Feel an Index
See why a profile page takes 8 seconds with a full table scan, and how an index brings it down to milliseconds. Learn composite indexes, why column order matters and why indexes aren’t free. Then load a million rows into Postgres and watch EXPLAIN switch from Seq Scan to Index Scan. The lab guide is attached as a resource.
Caching: Patterns, TTL, Eviction and Cache Stampedes
The biggest performance win in the course. Learn:
Where caches live, and hit vs miss
Cache-aside, write-through and write-back
LRU eviction
Stale data and TTLs
How to prevent a cache stampede
We finish with what FestSnap should, and should never, cache.
Interview Byte: Cache Consistency + Hands-on: Redis
Answer “How do you keep the cache consistent with the database?” without falling into the “update both at the same time” trap. Then use Redis yourself: cache a feed with a TTL, watch it expire and use atomic counters. An extra Python script shows cache-aside in code. The lab guide is attached as a resource.
Replication: Primary, Replicas and Failover
Learn how primary–replica replication works and its two wins: more reads and survival when a machine dies. You’ll also cover:
Synchronous vs asynchronous replication and replication lag
Read-your-own-writes
Automatic failover and split brain
Why replication is not a backup
Sharding + Hands-on: Watch Replication
When writes outgrow one machine, split the data. Learn how to choose a shard key, and compare range, hash and directory-based sharding. You’ll also see the hot-shard and cross-shard problems, and why sharding is a last resort. Then watch Redis replication live with two containers. The lab guide is attached as a resource.
The Design So Far + Course Wrap-Up
Rebuild the complete FestSnap architecture piece by piece, and remember the failure that earned each box its place. Review the thinking that came first, and the big lesson: no box is “best practice” on its own. It finishes with your homework: sketch any app on paper.
“This course contains the use of artificial intelligence.”
Every app you love started small: one idea, one laptop, one server. Then people showed up, and that's the day most apps break. System design is the skill of making sure your app doesn't break on that day. This course teaches it from absolute zero, with no experience needed.
HOW THIS COURSE IS DIFFERENT:
Instead of memorising definitions, we build one app together: FestSnap, a photo-sharing app for a college fest. It starts on a single small server, and we grow it until the whole country is using it. Every concept appears only when something breaks, so you learn WHY each piece exists, not just what it's called.
WHAT YOU'LL LEARN:
- Thinking before building: HLD vs LLD, functional vs non-functional requirements, and the 5 questions to ask before any design, with real back-of-the-envelope estimates
- Shaping the system: monolith vs microservices, vertical vs horizontal scaling
- Traffic and servers: how a request travels, load balancing algorithms, health checks, stateless servers, sessions and autoscaling
- Data: data modeling from access patterns, SQL vs NoSQL, and database indexes
- Speed: caching patterns, TTL, eviction, stale data and cache stampedes
- Surviving growth: replication, failover, backups and sharding
INTERVIEW BYTES:
Six short segments take a real interview question, such as "Design a URL shortener" or "SQL or NoSQL?". Each one shows the trap most candidates fall into and an answer structure interviewers look for.
HANDS-ON LABS:
Four labs you can run on your own laptop with Docker, with step-by-step guides included as downloadable resources:
1. Build a load balancer with Nginx and watch round robin live
2. Feel a database index turn a slow query into a fast one in Postgres
3. Use Redis as a cache, with TTLs and counters
4. Watch Redis replication copy data from a primary to a replica
By the end, you'll be able to sketch the architecture of almost any app and explain every box in it, because you'll know which failure each box solves.
AI disclosure: This course uses AI-assisted tools for parts of its production, including the animated visuals and the instructor avatar segments. All content was written, reviewed and narrated by the instructor.