India’s Leading Domain & Web Hosting Provider
Bus ticketing platform ends festive double-booking by extracting seat inventory
Ticketing platform for 3,200 bus operators, 1.6 lakh seats a day rising to 4.5 lakh in festive weeks · Google Cloud Mumbai · 14 weeks
As-is situation
The platform's seven-year-old Node.js monolith on Compute Engine handled route search, seat layouts, holds, payments and operator settlement against one PostgreSQL database. Seat holds were database rows locked for the duration of payment. When UPI callbacks arrived late, holds expired inconsistently, and about 0.6% of Diwali and Chhath bookings were double-sold or stuck in pending, generating thousands of refund tickets and operator disputes. A five-hour settlement batch on the same database also blocked schema changes for most of every night in peak season.
- 0.6% of festive bookings double-sold or stuck in pending state
- Payment callbacks delayed by up to 9 minutes while holding database row locks
- A five-hour operator settlement batch blocking schema changes on the online database
Approach, tools and architecture
NTSPL extracted seat inventory as its own service on Cloud Run with a dedicated Cloud SQL for PostgreSQL database, backfilled by Datastream and verified by three weeks of dual reads. Holds became explicit state with a 10-minute TTL in Memorystore. Booking became a saga in Workflows: hold seat, start payment, then confirm or compensate by releasing the seat and triggering a refund. Events travel over Pub/Sub with the trip ID as ordering key. Settlement now reads a ledger fed by those events instead of the online schema.
Implementation approach
Measured results
Operational improvements
- Every compensation step is visible in Workflows execution history, so support resolves disputes from one screen
- Inventory schema changes no longer wait for the settlement batch window
Cost considerations
Services cost INR 64 lakh. Cloud Run and Workflows add about INR 85,000 a month at festive peak and roughly a third of that off-season; Memorystore and the new Cloud SQL instance add INR 1.2 lakh a month.
Return on investment
Fewer refunds and operator disputes saved about INR 1.1 crore in goodwill credits and support cost in the first festive season, and operators who had threatened to move inventory to a rival platform stayed, protecting commission revenue.