How Much Is That Seat By The Window; How Flight Reservations Work #2

Feb 27, 2014

In my first post about flights I covered a lot of the terms and participants in making a flight reservation. This post will answer as best I can the more interesting bits.

This is a really, really long post. You need a beverage and some peanuts. I think there will be yet another sequel.

If you don't want to read the first article, here is a synopsis of a few useful terms. A segment is plane goes up plane goes down. A leg is you go from home to some distant place on one or more segments. One way is one leg, roundtrip is a leg out and a leg back. A scheduled flight is a set of segments set at a particular times and airports, assigned a number and often appears on regular schedule. A seat is where your butt will go on each segment's actual plane. A reservation is a temporary hold on some seats on segments for one or more legs which becomes permanent when you pay too much for a ticket.

There are of course a zillion more terms but that gets you started. One thing I've learned is that booking seats on planes is a massively complicated business that most people have never seen. I don't know everything perfectly, I work on the furthest most distant client end far from where all the magic happens, but I know enough to be dangerous. Assume everything I say is 100% correct except for all the wrong bits.

This post might also piss a few people off, either due to my mistakes or simply because some folks would rather not have you read it.

What I want to try to explain are the following questions. How does it know what flights to show me? Why is it so expensive? Why does the price in the list not always match the price that I pay? Why do flights get overbooked? What do airlines really want to do? Why does everyone seem to pay something different? Who the heck came up with such a bizarre mess? Why do people search endlessly for cheap flights across many sites thinking are finding deals? Why is it sometimes still better to call a specialized travel agent? Why have you ruined the magic by telling us stuff?

Before 1964 reservations were done by people stuffing paper into slots. Clearly that wasn't scalable so American Airlines and IBM got together and built the SABRE system to do it with a computer. Soon lots of airlines were building them, all oddly similar. Eventually they all got divorced from the airlines and after lots of history, today there are basically three, Sabre, Amadeus and Travelport, plus some minor ones. A few airlines insist stupidly on doing it themselves (Spirit for one). Before the advent of companies like Facebook and Twitter, these airline reservation systems had some of the highest transactions per second in the world.

Today when you book at an airline site, or an OTA, or call a travel agent, or anyone that handles booking, you are eventually going to wind up at one of the computerized reservations systems (CRS). Even an airline like Southwest, which only accepts reservations on its own website, still has a CRS behind it all. For the most part airlines pick one CRS to deal with. Some OTA's might use one or even combine all three. No matter who it is, airlines file what are called "fare rules" with a single organization which distributes these to all the CRSs. People contract with the CRS (sometimes confusingly called a GDS when it's more than flights) to support searching and booking; an OTA's systems for example will translate data back and forth as needed.

Now planes of course are real things with real (uncomfortable) seats, not some virtualized flappy bird creation. Lots of people want to sell you, the customer, that seat. Of course at first they want to tell you what rock-hard seats you can optionally pay money for from your origin to your destination, and possibly back on some pair of dates. Mind you there are at least 1,500 commercial airports in the world which 5.5 billion or so people visit in a year. I don't know if that's all the ones you can fly to with a ticket or how they calculated that. There are likely something like 100,000 or more individual flights each day. Each flight might have from 50 to 500 seats. So at 150 seats (a guess) that's something like 15 millions butts every day.

So imagine you want to fly from city A to nearby city B on date 1. You enter the search and it gives you a list. So, how did it decide what 50 flights to show you? Think of the 1,500 airports in the world as points on a sphere; how many possible connections can there be between any two of them with up to 4 segments? I have no clue but it's a lot. Of course you can only have ones that makes sense. So start with non-stop flights, then mix in one and two stop flights. Oh and we need seats available on each segment in the proper class, can't have the poor folks sitting in nice seats for cheap money. Oh and don't forget that not all airlines can connect to each other. Also note any connections might need to be long enough to not totally lose your luggage. Of course not all seats on each plane are available either, the airline might reserve them for itself. Now we have only 50,000 possibilities, how about we limit the total distance to something less than a parsec? Ok now we have too many still so only show them a sample.

Now imagine a flight from India to the U.S. and how many potential flights that are available. Basically you can route from anywhere to anywhere and wind up with millions of potential flights, each with all those limitations above. So give up and just show the first 50. You get the idea.

This is why using travel agents that specialize in certain areas is a good idea. The computer cannot generate an optimized list of flights given the enormous possibilities of long distance itineraries. But humans can remember and learn the best ones and get you better deals more often. The systems have to be generalized enough for any request and this makes them less good at finding the best options. For close in travel the computer is good enough but the further you go the more likely it will fail to find every option.

Note that the complexity here is due to many things. One is every airline that the search site/app/OTA has permission to show is all searched together. This is great for the customer because you can compare prices, which forces airlines to compete. What airlines really want is what Southwest does; you can only see their flights on their site. This is great for the airline, you can't easily compare the price with anyone else without a lot of manual trouble and who wants to do that? So with no comparison you can get away with not so legendary low prices in some markets. If all airlines did that profit would go up. But customers usually like to comparison shop so most airlines grudgingly allow it. Maybe not forever.

Most people think overbooking is just airline greed. Well yes it is and no it isn't exactly. The dirty secret of search and booking seats is caching. Everything is cached, even the caches. Each layer between the CRS and the user has caches of various often uncoordinated timeouts because the data is really big and the calculations as you saw above are very complicated. And there are lots of search pages all looking though these layers of caches to show you some list of flights at some price. All lists of essentially a view of the past. It might say 1 seat left but in reality 4 people might book that last seat around the same time. Who gets it is not an easy question and it is far easier to just let them all get it and fight it out later. This trade-off is far simpler to implement than to make it be exact, which would likely result in no one actually getting that seat. Basically it's an eventually consistent design. Of course the airlines are happy to take advantage and might even over represent the availability a little as well, I don't know that exactly. They know that a certain percentage of customers will not show up. So a little fudging might help fill all the seats even at the risk of too many butts.

Now this ties into why the search result list doesn't always match the final price. I know lots of people who think it's someone ripping them off but it isn't. Caches are to blame, since you can't have real time availability for thousands of viewers, you have to collect the results from various searches and cache them and of course each layer does its own caching. Google I believe in their fast flight search update the caches only rarely; since they don't book the flights no one seems to mind that it's often wrong. But people see $100 in our list and then it turns into $140 and they scream. You can make this happen less by updating the caches more frequently but then your performance goes down and maybe you get crappier flight choices since it's taking too long. It's all a tradeoff. The only time the flight booking process actually gets the final price is when you hit the button or whatever gets you to the "checkout" page. So that cuts through the caches and finally asks "what is the damn price already for this exact thing?" When you agree to pay or reserve it and you hit that button it checks one more time; occasionally the price could have changed while you were entering your information. There is usually a few minutes lock on the potential seats when you started on that page but if you take too long the lock might expire.

Sometimes too when it gets the final price it might discover that one or more seats you need suddenly aren't available any more and the reservation can't be made at all. Remember you aren't the only one booking stuff. This happens a lot on complicated itineraries across the world. It's a real time nightmare.

Yet another consequence of caching is that the exact flight on a different site or agent might not be the same. People think these are deals but what they really are is cache different. Airline fare rules are everywhere the same but filtered through a layer of caches, different application of rules, incorrect options, or even bugs can cause difference in flight prices. They are really supposed to be the same everywhere, except of course when this isn't true. I don't know if this actually works but imagine there are two seats left and there is a rule that makes the last seat more expensive. Multiple people search at the same time and see some identical cached price. Now they try to book. Who gets to see that last seat price? What if they give up and try again? The possibilities are endless. I don't really know if this happens this way but it seems consistent with the insanity.

Damn this is already too long and now I am getting to the fun part. Where does the price come from? So in good Hollywood tradition I will leave you with a cliffhanger. You won't believe what our hero does next! He pays some money! For a ticket! But how much is that seat by the window?

Part 3 soon. First I need to go book an actual flight...