Skip to content
SD-28 · HOTEL BOOKING · INTERACTIVE

Break it.
Then fix it.

Turn up the shoppers, watch what melts, and add the parts a real booking site needs. Every switch is a decision you would defend in an interview.

CHALLENGEServe 60K searches/s with p99 under 150 ms, no errors and no room sold twice.
StatusSTRAINEDAt 20K searches per second
Search p99234 msTarget under 150 ms
Errors0%Rooms can be sold twice
Monthly cost$4,7903 database nodes
ShoppersLIVE
20K searches/s · 200 bookings/s
traffic source
API gatewayOK
Auth, limits, autoscale
spreading 30K/s
App servers × 8HOT
Search + booking, stateless
30K / 40K req/s
Search indexOK
Hotels by place, dates, price
20K / 100K queries/s
Inventory DBDOUBLE
Bookings + room counts
200 bookings · 10K reads/s
Every result recomputes free rooms. Each search result and hotel page sums room counts over the stay from the database. Keep free rooms per night in memory, refreshed from booking events.
100 : 1Searches per bookingSearch is the load; booking is the correctness problem.
95%Cache hit rateFree rooms per night change only when someone books, so memory can answer.
1Shard per bookingSharding by hotel_id keeps every night of a stay in one transaction.
10 minHold lengthRooms are claimed before payment and released if the guest walks away.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.