India’s Leading Domain & Web Hosting Provider

  • Chat
    Live Chat 24 X 7 online support
  • Contact NTSPL Hosting support
    Call Now +91 - 8260003333
Google CloudOnline bus ticketingMedia, Gaming & Entertainment

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

Amazon Web Services
01

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
02

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.

Booking API → Workflows saga → seat-inventory service (Cloud Run + Cloud SQL) → payment service → Pub/Sub (ordering key = trip) → monolith read models and settlement ledger
Cloud RunCloud SQL for PostgreSQLWorkflowsPub/SubDatastreamMemorystore for Redis
03

Implementation approach

Weeks 1-2 · Booking-flow event stormingMapped holds, payments and refunds with operations and the payments team.
Weeks 3-8 · Inventory service and dual readsBuilt the service, backfilled with Datastream and compared availability answers.
Weeks 9-12 · Saga and failure testsImplemented compensations and injected late and duplicate UPI callbacks.
Weeks 13-14 · Festive load test and cutoverTested at 6 lakh seats a day, then switched writes before Diwali.
04

Measured results

Double-sold or stuck bookings in festive week
0.6%→0.03%
Refund tickets per festive week
About 9,400→About 650
Booking confirmation p95
14 s→3.1 s
Nightly window blocked for schema changes
5 hours→None

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
05

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.

06

Return on investment

ROI indicator

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.

Illustrative scenario: a composite based on typical NTSPL engagement patterns for this industry and service. It does not describe a named customer. The figures are indicative, and actual results depend on the workload, its scale and the commercial terms.