How would you expand bookings across regions without selling the same seat twice?
After this you can answer: How would you expand bookings across regions without selling the same seat twice?
Say it in 30 seconds
Section titled “Say it in 30 seconds”The deeper answer
Section titled “The deeper answer”The current row lock serializes bookings inside one database. Copying its state asynchronously to another region does not extend that lock across two independent writers. Both can see the same remaining capacity and accept incompatible bookings.
One proposed option assigns each event a home write region. Another partitions explicit inventory allocations among regions, accepting that unsold capacity may remain elsewhere during a partition. A globally coordinated write system has different latency and availability costs. Choose from product requirements and failure tolerance, not a requirement to use every region for writes.
For failover, define acceptable data loss, promote only after establishing writer ownership, and prevent the previous writer from returning unnoticed. Idempotency keys and queued side effects also need a regional recovery story; replicated data and replayed jobs can produce duplicate business actions. None of the cross-region replication, fencing, routing or recovery automation is implemented here.
Counter-questions
Section titled “Counter-questions”Could DNS failover solve database consistency?
What if zero data loss is mandatory?
Why keep one write region initially?
Where in MiniTickets
Section titled “Where in MiniTickets”Read the path chapter, select the relevant map piece →, then inspect apps/api/src/queries/bookings.ts → createBookingTx.
Read this book online: https://book.theversehub.in/