~learn.
lecture · 13:33 · 4 checkpoints · browser voice

Hotel reservations: the last room, sold once

One strong interview answer to hotel bookings: modest traffic on one PostgreSQL, inventory as a count per room type per night, the capacity check inside a conditional UPDATE across all nights, a unique idempotency key against double clicks, and a hold, pay, confirm saga with expiry, a sweeper and compensations for late payments.

01 · The last deluxe room
IP-19 · Design a Hotel Reservation System

A shopping cart with dates?

Modest traffic, hard correctness

Booking a hotel room looks like a shopping cart with dates.