May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
System Design and AI Engineering, by Roni Das. 989 interactive lessons in two courses.: 770 in System Design and 219 in AI Engineering.
Start LearningSystem design interview guide
in this guide
7 parts open to everyone · 3 with a free account · 3 with the course
You can read 7 of 13 parts. A free account opens the deep dive; the course opens all of it.
Seat booking is the clearest test of whether a candidate understands many things happening at once. Anyone can draw search, a booking service and a payment service. One question decides the interview. Two people tap the same seat at the same second. What happens? Then come the harder follow-ups. How long do you hold a seat? What if payment arrives after the hold ends? And how do you keep one seat correct when other systems, like an operator's counter, can also sell it?
This page is the free part.
₹1,111 in India$35 everywhere elseonce, for the whole course
The System Design course covers the redBus design across a run of lessons, not one page. These 4 alone are about 118 minutes of step-by-step reading, 1 of them with code you run in the browser, all with a quiz.
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
This guide is built on these 6 lessons. Each one teaches one piece of the redBus design above, step by step.
Lifetime access for ₹1,111 in India or $35 elsewhere. Interactive diagrams, quizzes, and 20 capstone projects to practise on.
This one question is not enough for the interview.
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (268 diagrams in all). A PDF you keep, junior to staff level.
Two courses by the author of this page:
770 lessons · 18 free to read
₹1,111 in India · $35 elsewhere, once
Get System DesignYou own this course
219 lessons · 10 free to read
₹1,333 in India · $35 elsewhere, once
Get Generative AI and Agentic AIYou own this course
Save your progress and get the interview checklist PDF
redBus sells more than 100 million bus tickets a year. It works in India, Southeast Asia and Latin America. From April to June 2026, its ticket sales were worth about $502 million. The number of tickets grew 23.9% from a year before (MakeMyTrip filing). But the seats it sells are not its own. They belong to thousands of separate bus operators. And the same seat on the same bus can be sold at the same moment in three places. It can sell on the redBus app, through a travel agent, or at the operator's own counter.
redBus is a marketplace for bus tickets. A traveller searches for buses between two cities on a date. They pick a bus and a seat on a seat map. They pay and get a ticket. It sounds like any booking system. But three things make it hard. First, the seats come from thousands of bus operators. Some run their buses on redBus's own software. Others use their own systems. Second, one seat is one physical thing, but it can be sold in several places at once. Two people must never get seat 14 on the same bus. Third, demand is very uneven. The evening before a festival, everyone wants the same routes at the same time. The main design problem is the seat lock. You hold one seat for one customer while they pay. You release it if they do not pay. And you never sell it twice.
Where it shows up
A natural question for travel and ticketing roles at MakeMyTrip, redBus, Goibibo, IRCTC and AbhiBus. It is also one of the most common interview questions in its general form. Design a bus, train, flight, cinema or event booking system.
Spec sheetredBus
worked through below, with the maths
The hard parts of this design are taught step by step in the System Design course: Time To Live (TTL), Circuit Breaker for Resilience and Distributed Locks.
Mutual exclusion across network boundaries. Redlock, ZooKeeper locks, and why they're harder than you think.
Safely retry failed API requests without causing duplicate side effects.
Stop calling failing services to prevent cascade failures, open, closed, and half-open states.
Set appropriate timeouts for every external call, deadline propagation and timeout budgets.
all part of
System Design Masterclass
770 lessons · about 290 hours · 18 free to read
₹1,111in India, by UPI
$35everywhere else, by card or PayPal
You own this course
Continue with Distributed Lockspay once,
yours for life
Live from the course bench
Real interview questions, live diagrams and measured lab results, pulled at random from the lessons. A new set every time you come back.
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Tickets per year
100 million+
A March 2026 case study puts redBus at more than 100 million bookings a year. It was published by CubeAPM, a monitoring company that redBus uses. A company's case study is not an audited number. So treat it as the right size, not an exact count.
Average bookings
~3 per second, all day
100 million tickets a year, divided by 31.5 million seconds in a year, is about 3 a second. This is my estimate. Bookings bunch up in the evening and before festivals. Searches happen many times more often than bookings. So plan for thousands of searches a second at the peak.
Ticket sales per quarter
~$502 million
MakeMyTrip reported bus ticket sales of $501.9 million for April to June 2026, in its SEC filing. That was up 20.8%, or 31.4% at fixed exchange rates. This is the value of tickets sold, not redBus's revenue.
Ticket growth
+23.9% a year
MakeMyTrip's filing says the growth came from 23.9% more bus tickets than a year earlier. So plan for peaks that grow at least this fast.
Seats per trip
~30 to 50
A typical sleeper or seater bus has about 30 to 50 seats. This is my estimate. It is what makes the problem hard. The lock is on a tiny, fixed set of seats. So a popular trip gets heavy competition, even though total volume looks small.
Markets
India, Southeast Asia, Latin America
MakeMyTrip's filing says redBus works in some countries in Southeast Asia and Latin America, as well as India. Each market adds its own money, payment methods and time zones. But the seat lock problem is the same everywhere.
Split the design into two paths with very different needs. The search path is mostly reads. It can be a little out of date. It answers which buses run between two cities on a date, with times and starting prices. Build it from a search index that is refreshed from operator data. Cache it heavily. A million people looking at Bangalore to Chennai on a Friday mostly see the same results. The booking path is mostly writes, on a tiny set of seats. It must be exactly right: this seat, on this trip, for this customer. Its heart is a seat service. It owns the state of every seat on every trip. It is the only thing allowed to change it. A seat has three states: free, held for one customer until a time, and booked. Holding a seat is one update. It works only if the seat is free. So two customers can never both hold it. Payment happens while the hold is active. If payment works, the seat becomes booked and a ticket is made. If the hold runs out first, the seat is free again. Seats reach redBus in two ways. Some operators run their buses on redBus's own cloud software, called BOGDS. Their seats live in redBus's systems. Other operators use their own software. redBus reaches them through a connection layer. A hold must be placed in the operator's system too, because their counter can sell the same seat. Most real-world failures happen in that connection.
In a real interview, sketch this on the whiteboard before diving into any single box.
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
It answers 'which buses run from A to B on this date'. It uses a search index of trips, prices and ratings, refreshed from operator data. It is cached by route and date. It can be a little out of date. The seat map and the hold are where seats are really checked.
It owns the state of every seat on every trip: free, held or booked. It is the only writer. Data is split by trip. So a rush on one popular bus never touches the data of any other bus.
It holds the chosen seats for one customer for a few minutes while they pay. A hold is an update with an end time. It is not a database lock kept open. So a customer who closes the app cannot block a seat forever.
It connects to operators who run their own booking software. It places and releases holds in their systems. It fetches their seat maps and confirms bookings. Each operator has its own time limit and a circuit breaker. So one slow operator cannot stall booking for everyone.
It creates the booking and takes payment while the hold is active. It confirms the seat when payment works. A booking ID is made first and used everywhere. So a repeated payment message never books twice or charges twice.
Other agents sell the same seats. Wikipedia says redBus runs SeatSeller, a system that shares bus seats with agents. Every partner sale goes through the same seat service and the same hold rules. That is the only way one seat stays correct everywhere.
It applies each operator's cancellation rules, refunds the customer and puts the seat back on sale. A daily check compares bookings, payments and operator records. It catches the rare case where someone paid but got no confirmed seat.
trips. One scheduled run of one bus. The source column says where the truth for its seats lives. It is either redBus's own operator cloud, or the operator's own system.
Every table for redBus, its keys, and which store fits it and why.
Two people tap seat 14 at the same second. This is the whole interview. Say the booking service reads 'seat 14 is free', then writes 'seat 14 is held'. Two customers can both read 'free' before either one writes…
6 deep dives on the parts that break at scale, with 2 diagrams: Two people tap seat 14 at the same second; How long to hold a seat; Payment works after the hold has ended.
Short holds versus long holds. Short holds keep seats on sale and are fair to others on a busy bus. But they fail slow payers. Long holds are kind to the payer, but they hide seats from everyone else…
5 decisions an interviewer expects you to defend, each with the alternative and why it loses here.
An operator runs its own software. The hold on its side succeeded, but the final booking confirmation call times out. Do you issue the ticket?
4 follow-up questions with model answers, the interview scorecard for this question, and a mock interview on Design redBus with the AI tutor.
The growth numbers come from MakeMyTrip's own SEC filing for April to June 2026. The 100 million tickets a year comes from a March 2026 case study. It was written by CubeAPM, a monitoring company that works with redBus. The names BOGDS (the operator cloud) and SeatSeller (the seat-sharing system) come from Wikipedia. The company has not published how its booking systems are built. So this is a standard seat-booking design that fits those facts. It is not a description of redBus's code. Estimates like seats per bus and peak load are mine, and they are marked.
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
Distributed Locks
advanced / distributed systems core
Idempotency Keys
intermediate / api design protocols
Circuit Breaker
advanced / reliability resilience
Timeout Patterns
advanced / reliability resilience
Cache-Aside Pattern
foundation / caching strategies
Search Engines
intermediate / database types storage
Saga Pattern
advanced / distributed systems core
Time To Live (TTL)
foundation / caching strategies
Read-Through Cache
foundation / caching strategies
28 walkthroughs of the products Indian interviewers ask about, each with the real scale numbers, the architecture and the trade-offs that company had to make.
interview readiness
Three questions from this guide. Answer them without scrolling up, the way you would have to in the room.
Pay by UPI, cards or netbanking through Razorpay. Pay by card or PayPal, in US dollars. Download at once from My packs.
NEWSystem Design Hands-On
Postgres Sharding: Complete Hands-On (PgBouncer + Citus). 2 h 36 min and 20 chapters: one PostgreSQL loaded until it breaks, then four shards behind a router you write, PgBouncer and Citus, with the 139-page slide deck. The first 15 minutes are free to watch.
Free PDF · 79 pages
25 real tech interview questions, answered in full
Five from each of our AI, GenAI, Inference, Maths for ML and Forward Deployed packs. Each with a diagram and a model answer. Free by email.
free tool
Check these numbers yourself
Put in your own guesses for redBus and see requests per second, storage, bandwidth and servers, with every sum written out.
Open the Capacity EstimatorIt is really nice and good Please join the course