schema_version: 1 decision: id: seat-holds-with-ttl title: Seat holds as Redis keys with a TTL status: accepted date: 2026-09-08 elements: [booking, seatlock] diagrams: [0500-building-blocks/booking.archify, 0600-runtime/book-seats.archify] context: > A customer may spend minutes at the payment page. Holding seats as rows in the database left orphans when a browser closed, and a nightly job freed them far too late for Friday shows. decision: > A hold is one Redis key per seat, set with SET NX and an 8-minute TTL. The payment webhook turns holds into an order in PostgreSQL; an expired key frees the seat without any job. consequences: > Holds survive no Redis restart; at worst a customer re-picks seats. The webhook must check the hold still exists before it confirms the order, otherwise it refunds.