Tracks · SDE-1
SDE-1 foundations
This track takes you from “what is system design?” to a full design of a URL shortener. You learn how a round runs, how to count users and servers, how to store data, and how to make one service bigger. You read short lessons, learn the main trade-offs, run a free load test, and finish with a mock interview.
- 50steps in 6 stages
- 14 h 55 minin total
- 4 weeksat 4 hours a week
Start here if the words “cache”, “index” or “load balancer” are new, or if you have never done a design round.
Skip to the SDE-2 track if you can already explain a cache, an index and a queue, and you want data at scale and failure.
The track has 31 lessons, 7 trade-offs, 12 practice steps. Steps marked “Free account” are inside the app.
Stage 1 of 6 · 2 h
How a design round works
You know what the interviewer wants, what to ask first, and how to say a trade-off in one clear sentence.
- 20 min
Lesson
What is system design?
What a system design interview really judges: not one right answer, but good choices that fit the needs, with their costs said out loud.
- 23 min
Lesson
How a design round runs: six steps in 45 minutes
The six steps of a design round, a clock for 45 minutes, one small design from start to end, and what each level should do.
- 22 min
Lesson
Requirements: what to ask first
How to turn a short, open question into a list of needs with numbers, and what reliability, scalability and maintainability mean in plain words.
- 22 min
Lesson
How good is good enough: uptime and speed
What 99.9 percent means in hours of downtime, what p50, p95 and p99 mean for speed, and why an average hides slow users.
- 12 min
Lesson
Reading and drawing architecture diagrams
What a box and an arrow mean, how to put numbers on them, and how to read a drawing to find the part that gets too busy first.
- 21 min
Lesson
Say it clearly: trade-off sentences and spoken English
The three-part trade-off sentence, simple phrases for each moment of a spoken round, and how to think aloud.
Stage 2 of 6 · 1 h 19 min
The web and APIs
You can follow one request from the phone to the server and back, and design a simple API.
- 12 min
Lesson
What happens in one web request
The steps from typing a web address to seeing the page: DNS, a TCP connection, an HTTP request and response, plus UDP, redirects and cookies.
- 12 min
Lesson
DNS: how a request finds your server
How DNS records turn a name into an address, how the TTL decides how fast a change reaches users, and how geo routing sends each user to a nearby server.
- 12 min
Lesson
REST and CRUD: resources, methods, status codes
How a REST API names things with URLs, what GET, POST, PUT, PATCH and DELETE mean, which are idempotent, and which status code to return.
- 12 min
Lesson
API errors and paging through results
How to shape an error so a program can read it, why a long list is returned in pages, offset against cursor paging, and how an OpenAPI file documents the API.
- 12 min
Trade-off
Offset vs cursor pagination
When to page a long list with offset and when with a cursor, with row counts, the shifting-page problem and the index you need.
- 7 min
DrillFree account
The last pages of the order list take 5 seconds
Practise this decision: offset or cursor paging, with worked numbers. Seven minutes.
- 12 min
Lesson
Cloud basics
What the cloud is in plain words: rented compute, storage and network, paid for by use, and the same three blocks at AWS, Azure and Google Cloud.
Stage 3 of 6 · 1 h 12 min
Count before you draw
You can turn users into requests per second, and requests into storage and servers.
- 25 min
Lesson
From users to requests per second
How to turn daily users into requests per second, with a busiest-time factor and a read to write split, plus the sizes, times and powers of two worth knowing.
- 24 min
Lesson
Storage, bandwidth and how many servers
How to work out how much data you store, how much data moves each second, how many servers and how much memory you need, and what it costs each month.
- 23 min
Lesson
Estimation drills at Indian scale
Three timed drills on Indian events, UPI payments on the 1st, a live cricket final and a train booking window at 10 am, using one routine for requests, data, writes and servers.
Stage 4 of 6 · 3 h 40 min
Store the data
You can choose a database, design tables, add an index, and stop two people from booking the same seat.
- 24 min
Lesson
SQL or NoSQL, and which kind
How to choose a database from the way your app uses its data: the five kinds of database, what each is good at, and what each costs.
- 13 min
Trade-off
SQL vs NoSQL
When to choose a SQL database and when a NoSQL one, the numbers that change the answer, and what breaks with each.
- 24 min
Lesson
Data modelling: tables, relationships, normal forms
How to turn requirements into tables: find the entities, decide how they link, draw them, and keep each fact in one place with the first three normal forms.
- 13 min
Trade-off
Normalize vs denormalize
When to keep each fact in one place and when to copy it on purpose, with the read-to-write numbers that decide it.
- 7 min
DrillFree account
The orders screen reads 100 rows for 20 orders
Practise this decision: copy the data or join the tables. Seven minutes.
- 25 min
Lesson
Indexes and reading a query plan
Why an index makes a query fast, how a B-tree and a composite index work, when an index hurts, and how to read EXPLAIN to find out what the database really does.
- 14 min
Trade-off
Add an index vs full table scan
When to add a database index and when a full table scan is the better plan, the numbers that decide, and what each choice costs on reads and writes.
- 7 min
DrillFree account
My last 10 orders takes about 8 seconds
Practise this decision: add an index or leave the scan. Seven minutes.
- 22 min
Lesson
Transactions: ACID and isolation levels
What a transaction promises (ACID), how isolation levels decide what two users doing things at the same time can see, and the bugs that appear when you choose the wrong level.
- 23 min
Lesson
Locking: stop double booking and overselling
How to make sure two buyers cannot get the same seat or the last item: atomic updates, locks, version checks, unique constraints, and seat holds that expire.
- 24 min
Lesson
Unique IDs: UUID, ULID, Snowflake, sequences
How to give every row a unique ID: database counters, random UUIDs, time-ordered IDs, Snowflake IDs and counter ranges, and which one to use for which job.
- 24 min
Lesson
Object storage and pre-signed uploads
Why photos and videos do not belong in database rows, how object storage keeps them, and how a phone uploads big files straight to storage with a pre-signed URL, in parts that can resume.
Stage 5 of 6 · 4 h 54 min
Make one service bigger
You know the cheap ways to handle more users: more servers, a load balancer, a cache and a CDN.
- 15 min
Simulator
Simulator Level 1: one server, 100 users
Run your first load test. See one server fail, and read the charts that tell you why.
- 21 min
Lesson
Scale up or scale out, and why servers must be stateless
Two ways to add capacity, a bigger machine or more machines, what each one costs, and why more machines work only when no server keeps a user's data in its own memory.
- 13 min
Trade-off
Vertical vs horizontal scaling
When to buy a bigger machine and when to add more machines, with server counts, failure share and daily cost worked out.
- 7 min
DrillFree account
One big machine or six small servers?
Practise this decision: one big server or many small ones. Seven minutes.
- 24 min
Lesson
Load balancing
What a load balancer does, how it picks a server, how it finds a broken server, and why the load balancer itself must not be a single point of failure.
- 13 min
Trade-off
Stateless servers vs sticky sessions
When to keep servers stateless with a shared session store and when sticky sessions are acceptable, with the numbers for each.
- 7 min
DrillFree account
Users are logged out when the evening peak ends
Practise this decision: sticky sessions or a shared store. Seven minutes.
- 15 min
Simulator
Simulator Level 2: your app went viral
Add servers and a load balancer to an app that went viral, then survive a crash.
- 24 min
Lesson
Connection pools and the database connection limit
Why servers keep a small set of open links to the database, why the database allows only so many, and how to check that servers times pool size stays under the limit.
- 24 min
Lesson
Caching basics: hit, miss, TTL, hit rate
Why a cache protects the database, and how to estimate how much it helps with simple arithmetic.
- 24 min
Lesson
Cache-aside, write-through, write-back
Who updates the cache when data changes: three ways to do it, what each one costs, and what can go wrong with each.
- 13 min
Trade-off
Cache-aside vs write-through vs write-back
Which cache write strategy to pick, the write rate and loss numbers that decide it, and what breaks with each one.
- 23 min
Lesson
What to throw out: LRU, LFU and cache size
What a cache removes when its memory is full, how the main rules (first in first out, random, least recently used, least frequently used) differ, and how to choose the size of a cache.
- 23 min
Lesson
Keeping cached data fresh (invalidation)
How old cached data can get, and the ways to keep it fresh: wait for the TTL, delete the entry when the data changes, or change the key. What each way costs and how to measure stale reads.
- 24 min
Lesson
When the cache is empty and everyone asks at once (stampede)
What happens to the database when the cache is empty or one popular entry expires, and how warm-up, TTL jitter and request coalescing keep the database alive.
- 24 min
Lesson
CDN: serving files from near the user
How a CDN keeps copies of your files in many cities, which files belong there and which do not, how to change a file safely, and how it keeps a sudden crowd away from your own servers.
Stage 6 of 6 · 1 h 48 min
Put it together
You can design a small system from start to end, and say why you chose each part.
- 27 min
Lesson
Case study: URL shortener
Design a URL shortener from numbers: estimate the load, make the short code, answer a redirect with a cache and an index, and find the limit where one database is no longer enough.
- 15 min
Cost lab
Food delivery in 3 Indian cities
Build a cloud bill for a food delivery app and bring it under the budget.
- 7 min
DrillFree account
40% of requests fail at the evening peak
A short, real situation about database connections. Seven minutes.
- 7 min
DrillFree account
Product pages time out at 8 pm
A short, real situation about a cache that goes cold. Seven minutes.
- 7 min
- 45 min
Design mockCheckpointFree account
Design a URL Shortener (like bit.ly)
Your checkpoint: a full mock interview with an AI interviewer and a report at the end.
Estimates
How the time is counted
These times are planning estimates, not deadlines. Yours will vary.
- Lessons and trade-off pages: the number of words divided by 130, rounded, plus 4 minutes to think.
- A Drill: about 7 minutes. A system design mock: allow about 45 minutes. A machine coding mock: allow about 75 minutes.
- Other mocks: a SQL mock with one problem, about 29 minutes. A behavioural mock, about 36 minutes. A resume mock, about 35 minutes. A coding mock, about 45 minutes.
- A simulator level or a Cost Lab workload: allow about 15 minutes. This is our own estimate for a first try. It can take you less or more.
- Incident investigation: time varies. The room has a simulated clock; your real time depends on how you investigate. It has no fixed time, so it is not counted in any total.
- The total is the sum of all steps that have a time. The weeks are the hours divided by 4, rounded up. We assume 4 hours a week, like a person with a job. Doing a step again is not counted.
Ready for the checkpoint?
The last step is a mock interview with an AI interviewer. It gives you a report that shows what you did well and what was missing.