Tracks · Senior
Senior system design
At the senior level the interviewer expects numbers, a fallback, and a clear reason for each choice. This track covers the hard parts: agreeing between machines, many places that accept writes, separate read and write models, and the big case studies such as search, video and web crawling. You learn the trade-offs that decide each choice, and you finish with a hard mock interview.
- 62steps in 8 stages
- 23 h 30 minin total, plus incident time (it varies)
- 6 weeksat 4 hours a week
Start here if you can already design a chat app or a payment flow, and you now need the depth that senior rounds ask for.
Do the SDE-2 track first if replication, queues and retries are not yet clear to you.
The track has 26 lessons, 12 trade-offs, 24 practice steps. Steps marked “Free account” are inside the app.
Stage 1 of 8 · 1 h 40 min
Agreement between machines
You can explain quorums, conflicts, locks with fencing tokens, and leader election in plain words.
- 12 min
Lesson
Agreeing with the majority (quorums)
How a write and a read each ask some of the copies, why R + W > N makes a read meet the newest write, and how to choose R and W for fast reads, fast writes or failures.
- 24 min
Lesson
When many places accept writes: conflicts
What happens when more than one server accepts writes for the same data: how a conflict is found, and four ways to settle it, from last write wins to merge rules that always work.
- 15 min
Trade-off
Leader-follower vs multi-leader vs leaderless replication
How to choose between leader-follower, multi-leader and leaderless replication, the numbers that change the answer, and what breaks with each.
- 22 min
Lesson
Only one worker at a time: locks, leases, fencing tokens
Why a lock shared by many servers is hard to make safe: the lease that ends while its holder is paused, clocks and failed lock servers, and the fencing token that lets the data reject a stale holder.
- 15 min
Trade-off
Lease vs lock vs fencing token
How to choose between a plain lock, a lease with a time limit and a fencing token, with lease lengths, failure counts and the fallback.
- 12 min
Lesson
Leader election and consensus in plain words
How a group of servers chooses one leader for each term: the Raft idea of terms, votes and a majority, why an old leader cannot save changes, what it costs, and when to use a ZooKeeper-style tool instead of writing it yourself.
Stage 2 of 8 · 1 h 59 min
How databases store data
You can choose between storage engines and indexes, and say what each costs on reads and writes.
- 24 min
Lesson
How databases write fast: LSM trees and Bloom filters
How a write-heavy database stores data: a log and a table in memory, sorted files that never change, merging in the background, and a Bloom filter that says a key is definitely not in a file.
- 16 min
Trade-off
B-tree vs LSM tree
Which storage engine to choose for a database, a B-tree or an LSM tree, with write amplification, read cost and disk wear worked out.
- 15 min
Trade-off
Bloom filter size vs false positive rate
How to choose the bits per key for a Bloom filter, with the false positive formula worked out and what each wrong answer costs.
- 16 min
Trade-off
Local vs global secondary index
When to keep a secondary index inside each shard and when to build one global index, with query fan-out, write cost and lag worked out.
- 7 min
DrillFree account
The restaurant dashboard asks all 20 shards
Practise this decision: a local or a global index on a sharded table. Seven minutes.
- 15 min
Trade-off
Consistent hashing vs rendezvous hashing
Which hashing method to use to map keys to servers when servers join and leave, the numbers that change the answer, and what breaks.
- 26 min
Lesson
Case study: Distributed cache and key-value store
Design a store that keeps keys on many servers: place keys on a ring, keep three copies, use quorums, store data on each server so that writes are fast, and see what changes when it is only a cache.
Stage 3 of 8 · 2 h 29 min
Events, money and workflows
You can design a flow where many services must agree, money must not be lost, and a failure can be undone.
- 23 min
Lesson
Separate reads from writes; store events (CQRS, event sourcing)
How to give reads their own copy of the data, shaped for each screen and filled from events, and how to store every change as an event instead of the current state: when each one pays and when it is too much.
- 15 min
Trade-off
CQRS vs one model for reads and writes
When to split reads from writes with CQRS and when one model is enough, the numbers that change the answer, and what breaks with each.
- 7 min
DrillFree account
The My orders screen takes most of one database server
Practise this decision: split reads from writes or keep one model. Seven minutes.
- 14 min
Trade-off
Event sourcing vs storing the current state
When to store every change as an event and when to store only the current state, with the numbers for storage, replay and rebuilds.
- 15 min
Trade-off
Outbox vs dual write vs change data capture
How to choose between a dual write, a polled outbox table and change data capture when a service must save data and tell others, with numbers.
- 7 min
DrillFree account
Some orders never reach the kitchen app
Practise this decision: how to save and announce together. Seven minutes.
- 15 min
Trade-off
Saga vs two-phase commit
How to choose between a saga and two-phase commit for a job that spans several databases or services, the numbers that decide it, and what breaks.
- 7 min
DrillFree account
Three services, one checkout: what holds it together?
Practise this decision: a saga or two-phase commit. Seven minutes.
- 15 min
Trade-off
Optimistic vs pessimistic locking
When to check a version at write time and when to lock a row first, with the clash rates and row limits that decide the choice.
- 7 min
DrillFree account
Two admins edit one menu and one save is lost
Practise this decision: check at save time or lock first. Seven minutes.
- 24 min
Lesson
Case study: Job scheduler
Design a job scheduler: store jobs by run time, let workers claim due jobs, handle crashed workers and repeats, make cron entries fire once, and find the point where the database is too slow.
Stage 4 of 8 · 4 h 9 min
The big case studies
You have seen how search, location, counting, crawling, file sync, video and metrics systems are built.
- 24 min
Lesson
Finding what is nearby: geohash, quadtree, H3/S2
How to answer 'restaurants near me' fast by cutting the map into cells, how geohash, quadtree, H3 and S2 do it, and why moving drivers need a different plan from fixed places.
- 24 min
Lesson
Search: inverted index, ranking, Elasticsearch in practice
How a search server finds documents by words: the inverted index, how results are ranked, how an index is split into shards, and how to keep it in step with the database.
- 24 min
Lesson
Counting at scale: top-K, trending, leaderboards
How to count when one counter is too busy or the items are too many: sharded counters, top-K with a count-min sketch, unique counts with HyperLogLog, trending, and leaderboards.
- 15 min
Trade-off
Precompute vs compute on read
When to store a ready answer in advance and when to calculate it at read time, the numbers that flip the choice, and what breaks with each.
- 25 min
Lesson
Case study: Search autocomplete
How a shopping app shows 8 suggestions while you type: a trie with the best 8 phrases on every node, scores from search logs, a trending layer, safe refresh, and serving from memory.
- 27 min
Lesson
Case study: Ad-click aggregation
How to count billions of ad clicks: a fast stream for live numbers, a nightly batch for the exact bill, one-minute windows by event time, late clicks, and counting each click exactly once.
- 27 min
Lesson
Case study: Web crawler
How a crawler fetches 100 million pages a day without hurting any site: the frontier with a queue per host, politeness and robots.txt, URL clean-up, and a Bloom filter that skips URLs it has already seen.
- 27 min
Lesson
Case study: File storage and sync (Dropbox, Drive)
How a file app keeps your files on every device: chunks named by their hash, uploading only what is new, a metadata database, sync with a change journal, and conflicts kept as copies.
- 28 min
Lesson
Case study: Video streaming: on demand and live (Hotstar IPL)
How to design a video app: make several sizes of each video, cut them into small files, let the phone choose the size, serve the files from a CDN, and prepare for a live match that millions join together.
- 28 min
Lesson
Case study: Ride-hailing and food delivery
How to design a ride-hailing app and a food delivery app: nearby drivers, ETA, assigning a driver without double booking, live tracking, the order lifecycle and the extra side of the kitchen, with the numbers.
Stage 5 of 8 · 2 h 16 min
Run it in production
You can say how you would watch the system, find a fault quickly, and change it without a big outage.
- 24 min
Lesson
Logs, metrics and traces: what each one tells you
What a log, a metric and a trace each tell you, the four numbers to watch on any service, and how one request is followed through many servers.
- 28 min
Lesson
Case study: Metrics and logging pipeline
How to design the system that collects metrics and logs from thousands of servers: agents, ingestion, a queue, time-series storage, queries, retention and cost, with the numbers.
- 12 min
Lesson
SLOs, error budgets and alerts
How to turn a reliability goal into a measured target, an error budget and an alert that fires when the budget is used too fast, and how a contract differs from a target.
- 24 min
Lesson
Debugging an incident: a method
A four-step method for a live problem: detect it, narrow it down with the dashboards, stop the damage, and then fix the cause so it does not return.
- 24 min
Lesson
Safe releases: canary, blue-green, rollback, feature flags
How to put a new version live so that a bug hurts few users and ends fast: the build and test pipeline, rolling, blue-green and canary releases, rollback, feature flags and A/B tests.
- 24 min
Lesson
Multi-region: latency, failover, data residency
Why an app runs in more than one region, how a second region is used (active-passive or active-active), what a region failover costs in seconds and lost writes, and where the data may live.
Stage 6 of 8 · 6 h
Practise the big case studies
You have designed some of the well-known systems from the case studies under a clock, and answered a twist from the interviewer.
- 45 min
Design mockFree account
Design Trending Searches and Top-K Lists
A mock about the most searched phrases of the last hour, and a restart that loses the counts.
- 45 min
Design mockFree account
Design Nearby Places and Nearby Friends
A mock about finding what is near a point, and a blocked person who still sees you on the map.
- 45 min
Design mockFree account
Design a Web Crawler
A hard mock about fetching billions of pages politely, without repeats.
- 45 min
Design mockFree account
Design a Video Streaming Platform
A hard mock about how fast a video starts, what storage costs, and counting each view once.
- 45 min
Design mockFree account
Design a File Storage and Sync Service
A hard mock about files that change on many devices, with versions and conflicts.
- 45 min
Design mockFree account
Design a Distributed Message Queue
A hard mock about a partitioned log: order, copies and a zone that loses power.
- 45 min
Design mockFree account
Design a Metrics, Logging and Alerting System
A hard mock about collecting metrics and logs, and alerts that must not be late.
- 45 min
Design mockFree account
Design Real-Time Collaborative Document Editing
A hard mock about many people typing in one document at the same time.
Stage 7 of 8 · 1 h
Say it at senior level
You know what a Senior answer sounds like, and how to handle the twist in the second half of the round.
- 24 min
Lesson
The second half of the round: twists and deep dives
How to handle a sudden change in the problem, how to choose two deep dives, and how to spend the last 18 minutes of a 45-minute round.
- 12 min
Lesson
What SDE-1, SDE-2 and SDE-3 answers look like
The same interview question answered at three levels, side by side, so you can see what an SDE-1, an SDE-2 and an SDE-3 answer each contain.
- 24 min
Lesson
Capstone: design and defend a system end to end
One full design round for a food-ordering app: the six steps, then three changes from the interviewer, each defended with one table of load against limit.
Stage 8 of 8 · 3 h 58 min, plus incident time
Practise the hard problems
You have tested your answers against load, a clock and an AI interviewer who changes a number.
- 15 min
SimulatorFree account
Simulator Level 7: put a CDN in front
Put a CDN in front of the app and read the hit ratio.
- 15 min
SimulatorFree account
Simulator Level 8: add a second region
Add a second region and see what failover and replication across regions cost.
- 7 min
DrillFree account
Tatkal opens: 200,000 people, 1,000 seats
A consistency choice under a rush. Seven minutes.
- 7 min
DrillFree account
Cashback must never repeat and never go missing
The “exactly once” question in a real shape. Seven minutes.
- 7 min
DrillFree account
Fresh logins rejected
A clock problem that looks like a security problem. Seven minutes.
- 7 min
DrillFree account
Slow for every customer at once
One customer slows down all the others. Seven minutes.
- Time varies
IncidentFree account
Incident investigation
Pick a senior-level incident and find the cause from the evidence.
- 45 min
Design mockFree account
Design Nearby Drivers and ETA for a Ride-Hailing App
A hard mock about nearby drivers and arrival time.
- 45 min
Design mockFree account
Design a Flash Sale System
A hard mock about a rush of buyers for a small stock.
- 45 min
Design mockFree account
Design a Payment System (UPI and Cards)
A hard mock about money that must not be lost or counted twice.
- 45 min
Design mockCheckpointFree account
Design a Distributed Key-Value Store
Your checkpoint: design the store itself, with replication, quorums and failure.
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.