5,000 hotels, a million rooms, one booking database
transcript
5,000 hotels. A million rooms. And the booking side needs just one database.
A million rooms, about 70 percent full. Stays average 3 nights. That's about 233,000 bookings a day. About 3 a second. Ten times that at peak. 30 a second. Lookers outnumber bookers. About 3,000 reads a second.
Tempted to split inventory and reservations into two services? Then every booking becomes a distributed transaction. For no benefit. One PostgreSQL makes the hold one local transaction. Chain grows? Shard by hotel. A booking only touches one hotel.
Browsing goes to search. Availability comes from a Redis snapshot. Up to a minute old. A hint, not a promise. Booking goes to the one database. It makes the real decision. And its changes refresh the snapshot.
The numbers allow the boring tool. So use it. Spend your effort on the race for the last room. Not the plumbing.
Full breakdown in the lecture.