architecturescalabilityhigh-availabilitylogistics

Scalable reservation system architecture - serious flaw


do you have guys any experience with way how modern scalable reservation systems works ? e.g. airports or transport agencies ?

We just found serious flaw in reservation system of our customer. They reserve seat for each user which search for travel connection. That means if transport capacity is e.g. 200 and there is 200 people searching for the same trip all those got reservation(with timeout e.g. 5minutes) so if there is marketing event and ~ thousands of people go on the site they actually cant see most searched trips because other users "prereserved" that already. This is not scalable.

I cant believe it works this way but that`s real app architecture. How you would ideally handle reservation situations ?

To make it more complicated, from the number of "prereserved" seats price is computed and so its different for each user (price changes as seats reservation changes).

For sure we will try to rip off that pre-reservation step, but then some people will be refused in the last step before booking so that will be disadvantage...


Solution

  • Your customer want's to sell as many seats as possible, right? Then he have to understand that some users might get a (polite) error message if they are unlucky (not quick enough).


    I would reserve a seat when someone clicks on "reserve". Then keep that seat reserved until the user checks out or until X minutes have passed (since it's a web based app).

    If all free seats where reserved during the period from the search to the click of the "reserve" button then just display an error message.