Why does IRCTC Struggle With Tatkal Bookings?
The Passenger Reservation System (PRS), run by Ministry of Railways' Centre for Railway Information Systems (CRIS), is the world’s largest online train booking platform accessible for the public through the IRCTC app and website.
Both IRCTC and Amazon handle massive traffic spikes but why does IRCTC still crash every morning at 10:00 AM sharp during tatkal bookings?
Grok's answer - Both face spikes, but Tatkal is a pure thundering herd on scarce seats that demand strict atomic inventory checks to stop double-booking. IRCTC’s NGeT (Next Gen e‑Ticketing) frontend talks to CRIS CONCERT (Centre for Railway Information Systems' Country-wide Network for Computerized Enhanced Reservation and Ticketing) backend (OpenVMS roots, still migrating to cloud PRS).
Amazon pre-scales elastic microservices + queues on AWS. It uses eventual consistency for most of its inventory. IRCTC cannot. Every confirmed berth needs a strong atomic lock so two people never get the same seat. That serializes the hottest rows in the CRIS backend and turns the database into the bottleneck.
Bots once hit 50% of first-minute traffic. Legacy fixed capacity + bots made it worse for years. Recent CDN, anti-bot, and capacity upgrades (aiming for 1.5 lakh bookings/min) help the front door, but the contention on limited inventory remains hard.
Sophisticated bots can still use human CAPTCHA solvers, residential proxies, stolen Aadhaar-linked accounts or advanced browser automation that mimics real behaviour.
IRCTC already layers strong defences: Aadhaar OTP for Tatkal, Akamai anti-bot filtering, multi-level CAPTCHA, AI detection of super-fast form filling, IP reputation scoring, massive deactivation of suspicious IDs (over 3 crore) and agent restrictions. These raise the cost dramatically and block the majority of automated traffic, but zero is not achievable.
A strict time-ordered queue + FCFS is the fair ideal and is often proposed in system designs for Tatkal.
Technical reasons it is hard at IRCTC scale:
- Request arrival order at servers ≠ user click time (network latency, device, location, ISP all distort it).
- Millions of concurrent hits across distributed DCs make a single global ordered queue a bottleneck and single point of failure.
- Seat inventory for each train+class must be serialized (atomic) to stop double-booking; a long queue just creates long waits while 98%+ requests still fail.
- Payment step after hold adds timeouts and complexity.
IRCTC uses rate limits, CAPTCHA/Aadhaar, admission control and fast in-memory counters instead, trading perfect fairness for stability and speed.
Queue helps serialize Tatkal requests, yet allotment still requires atomic decrement of each train-class inventory pool. A single global ordered queue across distributed DCs is hard: network jitter and clock skew distort true click order, and the queue itself becomes a bottleneck and failure point under the thundering herd. Hold-timeout-release is already standard practice. The remaining engineering challenge is keeping the system stable while fairly rejecting the vast majority who cannot get seats.
Pre-holding Tatkal by carving it from total inventory and releasing unused seats later is already the model. Dynamic forecast-based quota tuning is feasible. Server receipt time is the right fairness signal, yet consistent total ordering across distributed DCs under thundering-herd load still collides with clock skew, jitter, and the need for atomic per-pool decrements. The queue helps but becomes its own bottleneck.
More about the challenges
The Thundering Herd on Hot Rows: At 10:00:00 AM, hundreds of thousands of requests hit the exact same database rows (e.g., 12302 Rajdhani Express, 3AC Tatkal quota) simultaneously. When thousands of transactions queue up waiting for a database lock to release on the same trains inventory, connection pools exhaust, threads pile up, and the front-end servers time out.
The "Segment" Nightmare: A single train seat isn't just one item; it is a matrix of station segments. If a train runs Delhi → Kanpur → Prayagraj + Patna, selling Seat #42 from Delhi → Prayagraj locks that seat for Delhi → Kanpur and Kanpur → Prayagraj, while leaving Prayagraj → Patna open. Checking and locking this overlapping graph across thousands of concurrent requests requires complex row-level pessimistic locking ( SELECT FOR UPDATE ).
Developments
IRCTC has approved ~₹128 cr for NGeT ICT refresh (5 yrs) plus ₹187 cr for a DR site (CAPEX ~₹93 cr). Main data-centre refresh is listed around ₹146 cr. These are multi-year hardware/software projects for the ticketing stack.
It is also investing in modern technologies. IRCTC's Waitlist Confirmation Prediction model has been developed using actual PNR data spanning more than two years.
Amazon’s global tech & infrastructure spend alone exceeded $108 bn in 2025. In India it has committed $48 bn (2026-30), including >$21 bn for AI/cloud data centres.
Amazon’s absolute and relative infrastructure outlay is far larger. IRCTC’s spikes are extreme but predictable; the bottleneck is more often the shared PRS inventory lock than pure traffic spend.
Comments
Post a Comment