267
reads for every booking
100M searches and 300M listing views a day, for 1.5M bookings. Browsing may be seconds stale; only the booking must be exactly right.
Priya and Arjun press Reserve together
Bad: Check, then insert
Both check before either inserts; the villa sells twice.
Good: One conditional update
Add one per night only where reserved < total. Any night full? Roll back and refuse.
A villa is just a hotel with one room
One row per unit per night. A villa’s total is 1; a Deluxe King room type’s is 40. Same table, same booking path.
Counters never pick rooms. Could a three-night guest find no single room free throughout?
The trick
No. Rooms needed = the most stays on any one night, and the counter caps that at 40.
Four nights in Goa, three different prices
A season rule, a New Year’s Eve override and a Friday uplift make ₹52,000; fees and tax make ₹59,400. Reserve freezes it in a signed quote.
Booked on one site at 10:05. Booked again at 10:40.
iCal sync pulls other sites’ calendars now and then, up to two hours late, and can only say “closed”, never “3 of 40 left”.
The fix: push changes, don’t pull calendars
- One channel manager owns counts for every site
- It pushes each change; apply them in order
- Push your bookings out within seconds
- Rare clash: move the later guest nearby
Remember
One counter per unit per night, changed by one conditional update. Every copy, from search to other sites, refreshes from the change stream.