India’s Leading Domain & Web Hosting Provider

  • Chat
    Live Chat 24 X 7 online support
  • Contact NTSPL Hosting support
    Call Now +91 - 8260003333
AWSTravel and hospitality technologyHealthcare & Life Sciences

Hotel booking engine ends overbooking with DynamoDB conditional writes on room inventory

Booking engine and channel manager provider, about 250 employees, serving 3,800 hotels · Pan-India, with properties in Southeast Asia · 10 weeks

Amazon Web Services
01

As-is situation

Room availability for 3,800 properties sat in a MySQL 5.7 database on a single large EC2 instance, with a row per property, room type and date. Rates and availability were pushed from hotel PMS systems and pulled by online travel agencies and the hotels' own websites. On long weekends and during wedding season, availability updates reached 9,000 writes per second; row-lock waits climbed, the channel sync fell up to 12 minutes behind, and hotels reported around 140 overbookings a month, each costing a walk-out compensation and a reputational hit.

  • Write bursts of up to 9,000 updates per second on a single MySQL primary
  • Lock contention on popular properties causing channel sync lag of up to 12 minutes
  • About 140 overbookings a month from race conditions between concurrent bookings
  • MySQL 5.7 past community end of life with no tested failover
02

Selected AWS services and architecture

NTSPL remodelled inventory as a DynamoDB table with partition key PROPERTY#id and sort key DATE#date#ROOMTYPE#code, holding available count and version. Every booking decrements availability with a TransactWriteItems call that uses a condition expression requiring available rooms to be at least the quantity requested across all nights of the stay, so two concurrent guests can never take the last room. DynamoDB Streams trigger Lambda functions that push changes to channel partners within seconds. A GSI on city and date supports search pre-filtering, while rate plans, contracts and invoices moved to Aurora MySQL, which suits their relational nature. Global tables replicate inventory to a Southeast Asia Region for local reads.

Guests and OTAs → API Gateway → booking service → DynamoDB inventory (TransactWriteItems with conditions) → DynamoDB Streams → Lambda channel push; rate plans and invoices → Aurora MySQL
Amazon DynamoDBDynamoDB StreamsDynamoDB global tablesAWS LambdaAmazon Aurora MySQL-Compatible EditionAmazon ElastiCache
03

Implementation approach

Weeks 1-2 · Access-pattern workshopListed 14 read and write patterns with product and channel teams and designed keys and one GSI to serve them.
Weeks 3-6 · Booking service rewriteRebuilt the availability service on DynamoDB transactions and moved rate and contract data to Aurora MySQL.
Weeks 7-8 · Dual-write and reconciliationWrote to both stores for two weeks and reconciled availability nightly until differences reached zero.
Weeks 9-10 · Channel sync cutoverSwitched channel push to DynamoDB Streams and retired the MySQL inventory tables.
04

Measured results

Overbookings per month
~140→0 caused by inventory races
Channel availability sync lag at peak
Up to 12 min→Under 5 s
Availability write p99 latency at peak
1.8 s→~12 ms
Sustained peak writes handled
~9,000/s with lock waits→25,000/s in load test without throttling

Operational improvements

  • On-call engineers no longer kill blocking MySQL sessions on long weekends
  • Overbooking investigations dropped from a weekly support queue to occasional PMS data issues
  • Capacity for festive peaks needs no pre-planning because on-demand tables absorb bursts
05

Cost considerations

The inventory table started in on-demand mode because write volume varies 20x between weekdays and long weekends. After three months the steady weekday floor was moved to provisioned capacity with auto scaling. Transactional writes consume double write units, which the team accepted for correctness. Global tables add replicated write cost only for Southeast Asian properties.

06

Return on investment

ROI indicator

Each overbooking cost hotels roughly INR 6,000-10,000 in compensation and alternative rooms, so eliminating them is worth an indicative INR 1-1.7 crore a year across the client base. Faster channel sync also lifted conversion on partner sites, which the provider uses as a differentiator in hotel sales.

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.