India’s Leading Domain & Web Hosting Provider
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
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
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.
Implementation approach
Measured results
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
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.
Return on investment
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.