Field Notes

No. 04 · Case studySystem DesignDone

IRCTC at 10 AM: How Tatkal Booking Really Works

Bots, a 1990s core system, seats sold by the stretch, and why your seat is not locked while you pay.

In simple words

Every day at 10:00 AM (AC classes) and 11:00 AM (non-AC classes), Tatkal booking opens on IRCTC. A few thousand seats, and what feels like the whole country pressing “Book Now” in the same minute.

A few numbers to set the scene:

  • IRCTC’s record is 30,155 tickets in a single minute, at 10:01 AM on 12 March 2025. That’s Tatkal time.
  • In June 2026, 2 out of every 3 requests reaching IRCTC’s e-ticketing system came from bots, not people (65.95%, according to a written reply in Lok Sabha).
  • About 89% of all reserved railway tickets are now booked online.

So IRCTC has to do four hard things at once:

  1. Survive the rush, most of which isn’t even human.
  2. Never give the same berth to two people for the same part of the journey.
  3. But reuse that berth for a different part of the journey: Mumbai → Surat for one person, Surat → Delhi for another.
  4. Take money safely, even when payments are slow or happen twice.

And here’s the part that surprised me. Most system design videos (including the ones that got me curious) answer this with “lock the seat in the database until payment is done.” That’s not how IRCTC works. You pay first, and the seat is booked after. If it’s gone by then, you get a waitlisted ticket or your money back.

At 10:00 AM requests flood in; most are bots and get filtered out before reaching the booking system 10:00 AM: the flood. In June 2026, about 2 in 3 requests were bots. (Illustration based on the reported share.)

What I understood

Two systems, not one

When you book on IRCTC, you’re really talking to two systems:

IRCTC website / app (NGeT) PRS (the reservation core)
Job Logins, search, passenger details, payments, e-tickets The actual seats: who sits where, on which stretch, waitlists, charts
Built by IRCTC (Next Generation e-Ticketing, live since April 2014) CRIS, the railways’ IT arm, in the 1990s
Tech (publicly reported) Being upgraded: new servers, CDN, anti-bot tools OpenVMS, with code in C and Fortran; data spread across several data centres
Used by Website and app users Website, app, railway counters, agents: everyone

That second column is the key. Whether you book at a station counter, on the app or through an agent, the seat comes from the same reservation core. There’s one source of truth for every berth.

Layer 1: keep the crowd outside the door

If two-thirds of the traffic is bots, the first job isn’t booking seats. It’s deciding who even gets in:

  • Anti-bot technology: the Ministry says it blocks about 64% of malicious attempts on average. The reported tooling includes Akamai for bot mitigation and content delivery.
  • Aadhaar for Tatkal: from 1 July 2025, only Aadhaar-authenticated users can book Tatkal online, and from 15 July 2025 an Aadhaar-based OTP is required.
  • Fake accounts removed: more than 6.68 crore user IDs were deactivated between January 2024 and June 2026, with another 6.22 crore suspended pending revalidation.
  • Agents wait their turn: authorised agents can’t book Tatkal in the first 30 minutes (10:00–10:30 for AC, 11:00–11:30 for non-AC). For the 8 AM general booking window, they’re blocked for the first 10 minutes.

That last rule also explains something I’d noticed myself: on third-party apps like ConfirmTkt or MakeMyTrip, Tatkal seems to open around 30 minutes later than on IRCTC’s own app. The official rule I could find covers authorised agents. I couldn’t find an official statement about these apps specifically, so this part is my own experience.

Layer 2: switch off the extras at peak time

The second trick is the same one JioHotstar uses: protect the critical path, pause the rest.

Between 10 AM and 12 noon, Tatkal booking stays on while extras like Quick Book and agent access are switched off During the rush, booking stays on and the extras wait.

  • Quick Book (the one-page booking form) has been reported as unavailable from 8 AM to 12 noon, in rules going back to 2015.
  • During the morning windows, IRCTC has limited users to one booking per login session and a small number of tickets per user ID.
  • From my own experience, features like editing the master passenger list and downloading tickets are often unavailable during Tatkal hours. I couldn’t find an official list of what gets paused, so treat this as one user’s observation.

Rules like these have changed over time, so it’s worth checking IRCTC’s current notices. The idea stays the same: every request that isn’t a booking is load the booking path doesn’t need at 10:00.

One berth, never two people

Now the core problem: the last berth in 3A, and two people click “Book” at the same instant.

Two booking requests for the last berth reach the reservation core together; it processes them one at a time, so one gets CNF and the other gets WL Two clicks, one berth: the core handles them one after the other.

The way this is solved is simpler than it sounds: the check and the booking happen as one step, inside the one system that owns the seats. “Is it free? Then mark it mine” can never be split, so two requests can’t both see “free”.

Public descriptions of the core say it uses a custom database with locking, partitioning and logging, with the application handling transaction integrity. So the lock does exist. It just lasts milliseconds, around the booking itself, not minutes while you pay.

One berth, many people (the Mumbai → Surat → Delhi trick)

Here’s my favourite part. Say berth 23 in B2 runs Mumbai → Delhi:

  • Person A books Mumbai → Surat.
  • Person B books Surat → Delhi, on the same berth.
  • Person C asks for Vadodara → Kota. That overlaps with Person B’s stretch, so no.

A berth’s journey is split into stretches between stations; Person A takes Mumbai to Surat, Person B takes Surat to Delhi, and Person C’s overlapping request is rejected A berth isn’t sold once. Each stretch between stations is sold separately.

So the thing being sold isn’t really “a seat”. It’s a seat × a stretch × a date. Railways have built rules around this for decades:

  • Quotas for parts of the route: Pooled Quota (PQ) covers some origin-to-intermediate and intermediate journeys, and Remote Location (RL) quotas set aside berths for important stations along the way. That’s why you see PQWL and RLWL waitlists.
  • The vacancy chart: since 2019, IRCTC shows charts with berths marked booked, vacant or partially booked, including vacancy from intermediate stations. “Partially booked” is exactly the Mumbai → Surat case.

How would you build this? A common way to model it (my own sketch, not IRCTC’s code) is one bit per stretch for each berth:

Stations:  Mumbai  Surat  Vadodara  Ratlam  Kota  Delhi
Stretches:      [1]    [2]       [3]     [4]   [5]

Person A (Mumbai → Surat)   wants 1 0 0 0 0
Person B (Surat → Delhi)    wants 0 1 1 1 1   → no overlap with A: OK
Person C (Vadodara → Kota)  wants 0 0 1 1 0   → overlaps with B: rejected

A booking is allowed only if none of its bits are already taken. Then all its bits are set in the same step.

Pay first, book after (not “lock until payment”)

This is where I was wrong before researching. The usual interview answer says: hold the seat with a timer, let the user pay, then confirm. Two of the reels I watched said clearly that this is a “standard interview design, not IRCTC’s own system”.

What IRCTC actually does, as best I can tell from its own documents:

  1. You see availability, enter passengers and click “Pay and Book”.
  2. You pay first. The seat is not held for you during payment.
  3. After the payment succeeds, the booking request goes to the reservation core.
  4. The core books whatever is available at that moment: confirmed, RAC or waitlisted.
  5. If nothing can be booked, the ticket isn’t issued and the money is refunded.

Interview answer: hold the seat, pay, confirm. IRCTC: pay first, then the booking is tried; the result can be CNF, WL, or No Room with a refund The interview answer holds the seat. IRCTC doesn’t: it books after you pay.

The proof is in IRCTC’s own document on its payment gateway, iPay. It explains that Autopay is useful when a ticket “does not get booked even after deduction of payment” because of “Berth choice not met” or “No Room”. That can only happen if the seat wasn’t locked while you paid.

It also explains a frustration every Tatkal user knows: “It showed AVAILABLE, I paid, and got a waitlisted ticket.” The availability you saw was a snapshot. By the time your payment came back, other bookings had already taken those berths.

IRCTC gives you two ways to soften this:

  • “Book only if confirm berths are allotted”: if the core can’t give you confirmed berths, it doesn’t book, and you get a refund.
  • iPay Autopay: instead of taking your money, IRCTC places a hold (lien) on it. Your account is debited only once the PNR is generated. If a Tatkal waitlisted ticket never confirms, only the applicable charges are taken and the hold is released.

So, in one line: IRCTC doesn’t lock the seat while you pay. With Autopay, it locks your money instead.

Why choose this design? My reading: with lakhs of people booking at 10:00, a seat held for 5 minutes by someone whose payment fails is a seat nobody can book. Payments can take minutes, and seats sell out in seconds. IRCTC chose to keep seats moving and handle the money side afterwards (refunds), instead of freezing seats for slow payments.

What if you pay twice?

This happens more than you’d think: you tap “Pay”, the app hangs, you tap again. Or the bank debits you but the response never reaches IRCTC.

The same booking attempt is paid twice; only one PNR is created and the extra payment is refunded One booking attempt can produce at most one ticket. Any extra money goes back.

How this is handled, in general terms:

  • Every booking attempt has its own transaction ID. One transaction can produce at most one ticket (PNR), no matter how many payment messages arrive. This is the idempotency idea from my earlier 10 problems post.
  • Money with no ticket gets refunded. If an amount is debited and no ticket is issued, IRCTC refunds it to the original payment method, and you can track it under My Transactions. If a refund doesn’t arrive, you can raise a TDR or contact IRCTC.
  • Autopay avoids the problem entirely, because nothing is debited until there’s a PNR.

IRCTC doesn’t publish its internal payment-matching logic, so this section describes the general pattern. What IRCTC does publicly confirm is the refund behaviour.

Why a new website in 2026?

The website is from 2002 (27 tickets on its first day), and the e-ticketing system was rebuilt as NGeT in 2014. By 2026 the pain points were clear: slow pages, failed transactions and timeouts during peak windows, plus outages on busy days. In June 2026, Railway Minister Ashwini Vaishnaw announced an upgrade after passengers, including students, raised booking problems.

What changed on the front (beta, from 15 July 2026, at irctc.co.in/eticket):

  • Fewer captchas, pop-ups and distracting graphics
  • Seat availability for all classes on one screen
  • Fewer steps to complete a booking
  • Saved passenger details for faster repeat bookings

What’s changing underneath (the bigger story):

Area Before Target / reported progress
Booking capacity ~25,000–37,000 tickets/minute (figures vary by report) 1–1.5 lakh tickets/minute
Enquiries ~4 lakh/minute 40 lakh+/minute
Reservation core (PRS) OpenVMS-era system from the 1990s Microservices, cloud-native (CRIS)
Disaster recovery Peak-time outages hurt badly Active-active backup site (planned at Secunderabad)
Servers Older hardware Capacity roughly doubled with new servers (Sept 2026, per IRCTC)
Static content Served by the booking platform Moved to a CDN

The results so far, as IRCTC reports them: a record 20,06,353 tickets on 7 September 2026, with no outage of the platform. Website uptime was 99.98% from April to October 2025.

One honest note: the new reservation engine has been “coming soon” for a while (the first target was December 2025), and different reports quote different capacity numbers. I’ve given ranges where they disagree.

Could it be better?

From the outside, these are the trade-offs I’d question:

  • Pay-first means paying for nothing sometimes. Tatkal users regularly pay, get “No Room” or a waitlist, and wait days for a refund. Autopay fixes this, but only if you choose it. Making Autopay-style holds the default would remove a lot of frustration.
  • Bots are still winning on volume. Even after all the measures, about 2 in 3 requests in June 2026 were bots. Blocking at the door helps, but the incentive (resale) is still there.
  • The core is old. OpenVMS, C and Fortran have served India for decades, but modernising them is slow and risky. The new engine’s delays show how hard it is to replace a system that can never stop.
  • The first minutes decide everything. When the whole country competes in one minute, speed beats fairness. A virtual queue with a randomised order for the first few minutes is one idea I’d want to explore (my own suggestion, not something IRCTC has announced).
  • The numbers are hard to follow. Capacity is quoted as 25,000, 30,000, 32,000 and 37,000 tickets a minute depending on the source. A simple public status page would build trust.

How I’d apply it

  1. Don’t hold scarce things while waiting on slow things. If an external step (payment, approval, a third-party API) can take minutes, either don’t hold the resource at all and handle failure afterwards (IRCTC’s way), or hold it with a short timer (the movie-ticket way). Pick based on how scarce the resource is and how often the slow step fails.

  2. Keep one source of truth for anything that can be double-booked. Many front doors (app, website, counter, agents) are fine, but one owner decides.

  3. Model time or segments explicitly. Hotel rooms by night, meeting rooms by hour, cloud capacity by time slot: all are “seat × stretch”. A bitmask or interval check with an atomic update goes a long way:

    -- My own sketch, not IRCTC's code: book stretches only if none are taken
    UPDATE berth
    SET taken = taken | :wanted
    WHERE train = :train AND journey_date = :date AND berth_no = :berth
      AND (taken & :wanted) = 0;
    -- 1 row updated  → booked
    -- 0 rows updated → part of that stretch is already taken
  4. Treat bots as your biggest user. Rate limits, bot management at the edge, and identity checks (like OTP) before the expensive work starts.

  5. Have peak-hour switches ready. Feature flags that pause non-critical features at known peak times are cheap and effective.

  6. Make payments idempotent. One transaction ID, at most one result. Everything extra is refunded automatically.

What I learned

1. The interview answer isn’t the only right answer

“Lock the seat until payment” is a fine design, and it’s what most system design videos teach. IRCTC chose the opposite: pay first, book after. When seats sell out in seconds and payments can take minutes, a held seat is a seat nobody can book. For IRCTC, a refund is less painful than a frozen seat.

2. A seat isn’t just a seat

What IRCTC really sells is a seat × a stretch × a date. That’s how one berth carries a passenger from Mumbai to Surat and another from Surat to Delhi on the same day, and why the system can say “no” to an overlapping stretch while saying “yes” to the one next to it.

3. The biggest user is a bot

In June 2026, two out of every three requests weren’t human. So the first layer of the design isn’t booking at all. It’s deciding who gets in: bot filtering, Aadhaar OTP, and agents waiting their turn.

4. Old systems can still be the source of truth

A reservation core built in the 1990s, on OpenVMS with code in C and Fortran, still decides every berth in India. Every door (app, website, counter, agent) leads to the same core. Modernising it is slow and careful because it can never stop.

5. Peak time means doing less

At 10 AM, the smartest move is to switch things off. Quick Book, early agent access and other extras wait, so the one path that matters, booking a ticket, stays clear.

Sources

  • #system-design
  • #irctc
  • #tatkal
  • #concurrency
  • #payments
  • #bots
  • #case-study