{"id":1407,"date":"2026-11-16T21:25:00","date_gmt":"2026-11-16T21:25:00","guid":{"rendered":"https:\/\/www.jetexe.com\/blog\/?p=1407"},"modified":"2026-11-19T16:25:00","modified_gmt":"2026-11-19T16:25:00","slug":"serverlessops-empty-leg-surge-steps","status":"publish","type":"post","link":"https:\/\/www.jetexe.com\/blog\/serverlessops-empty-leg-surge-steps\/","title":{"rendered":"How a Charter Desk Tamed Booking Surges: ServerlessOps in 8 Steps"},"content":{"rendered":"<p>The manager of an online desk for a small charter broker had a recurring headache, and every few weeks the same thing happened. An aircraft finished a one-way trip with no passengers for the return, someone posted the discounted seat as an offer, and within ten minutes the booking system was drowning. Requests doubled, then tripled. Some customers were charged twice, some never got a confirmation, and by lunchtime her inbox looked like a lost-baggage hall. What follows is the sequence she used to fix it, laid out as steps you can copy. The underlying craft is often called ServerlessOps: keeping small event-driven cloud functions honest when demand arrives in bursts.<\/p>\n<h2>Step 1: Draw the path of one request<\/h2>\n<p>She started on paper. A customer taps &#8220;reserve&#8221;, which creates an event; one function checks availability, another takes payment, a third sends the confirmation, a fourth tells the operations team. She wrote the four boxes in a row and marked, in red, the two that touch money or a customer&#8217;s inbox. Every later step applied to the red boxes first.<\/p>\n<p>If this sounds basic, it is. The reference entry on ServerlessOps from the Ops Atlas lists &#8220;inventory the triggers&#8221; as the first month&#8217;s work in its suggested ninety-day plan, before anything clever is attempted.<\/p>\n<h2>Step 2: Give each booking a reference that survives a retry<\/h2>\n<p>The double charges came from retries. Platforms deliver events at least once, so a slow payment step led to a second delivery, which led to a second charge. Her team stopped keying their duplicate check on the identifier attached to each message and used the booking number instead. The distinction matters because, as the Atlas explains, a message that is redriven from a failure queue gets a fresh identifier while the booking number stays the same.<\/p>\n<p>She also passed the booking number onward to the payment provider so the repeat could be recognised there as well. One caution from the Atlas: payment providers forget such keys eventually, in one well-known case after twenty-four hours, so a replay days later needs a local record too.<\/p>\n<h2>Step 3: Put a ceiling on parallel work<\/h2>\n<p>During the first surge, the booking functions used nearly the whole shared pool of concurrent executions in the account, and an unrelated reporting function stopped running. The fix was a limit on the reservation function and a reserved slice for the payment function. The Atlas offers a rule of thumb: plan for peak usage of roughly 70 percent of the cap, and remember that reserving capacity for one function needs an unreserved pool left over for the rest.<\/p>\n<p>She picked a number, wrote it in the runbook next to the reasoning, and set a notice for when headroom fell under a third.<\/p>\n<h2>Step 4: Decide where unfinished work goes<\/h2>\n<p>Her team had never asked what happens to a booking that fails after all retries. The answer was &#8220;it vanishes&#8221;. They attached a failure destination to each asynchronous step, set its retention longer than the source queue&#8217;s, and added an alarm that paged a named colleague on the operations side, the owner. The Atlas is blunt that a failure queue without an owner is a bin.<\/p>\n<p>Later she learned that failure destinations on some services keep only the position of the failed record and not the record, so her team also copies every original request into object storage for full replays.<\/p>\n<h2>Step 5: Nest the time limits<\/h2>\n<p>The availability check called a partner&#8217;s inventory service and waited as long as that service wanted. During the surge the partner slowed down, the function sat idle but billed, and the monthly bill jumped. She shortened the downstream timeout so it expired well before the function&#8217;s own limit. In the Atlas&#8217;s lab example, making one dependency ten times slower pushed the cost of the affected function up roughly ninefold, which matched what had landed on her own invoice.<\/p>\n<h2>Step 6: Return only the failed items<\/h2>\n<p>Notifications went out in batches. When one message in a batch of ten was malformed, the whole batch was retried and nine customers got duplicate emails. Switching on partial batch responses meant only the bad message went back. She also set the alarm on queue age and not only on errors, because items returned for retry are not counted as errors.<\/p>\n<h2>Step 7: Rehearse the storm<\/h2>\n<p>With the pieces in place, the team ran a drill on a quiet Tuesday. They fired the same set of test reservations twice, then three times, then with a deliberately slow payment stub. The target, in the Atlas&#8217;s maturity language, was zero double effects. It took two rounds to get there, because the notification step had its own gap. She wrote the drill into the release checklist.<\/p>\n<h2>Step 8: Review the numbers monthly<\/h2>\n<p>Finally, a standing half hour each month: what did a million events cost, how old was the oldest failed item, how often were calls throttled? None of it was dramatic. Trends showed when to adjust a cap or a timeout before a customer noticed.<\/p>\n<h2>A note on keeping it up<\/h2>\n<p>Habits fade unless something anchors them. The manager pinned the drill and the monthly review to the calendar, and attached the one-page runbook to the onboarding pack for new hires, so a person arriving in month ten inherits the reasoning along with the settings. Without that anchor, caps drift upward, timeouts creep back, and the next offer finds the same weak joints.<\/p>\n<h2>What to take away<\/h2>\n<p>The method is not tied to charter work, but offers that appear suddenly and vanish when the aircraft is committed are a natural stress test. If you are curious about how those offers come about, our walkthrough of <a href=\"https:\/\/www.jetexe.com\/blog\/how-empty-leg-jet-flights-work\/\">why returning jets fly with no passengers and how those seats get offered<\/a> covers the travel side, while the <a href=\"https:\/\/www.jetexe.com\/blog\/empty-leg-flight-guide-for-private-jet-travelers\/\">buyer-oriented empty-leg guide<\/a> explains what a traveller should expect. For the engineering reference she used, see <a href=\"https:\/\/www.xopsschool.com\/serverlessops\/\">the ServerlessOps write-up in the Ops Atlas<\/a>, which is also open about the term being an older, informal label.<\/p>\n<p>The eight steps took her team about six weeks of part-time effort. The next empty-leg offer went out on a Friday afternoon, drew a crowd, and nobody was charged twice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A small charter desk kept double-charging customers whenever an empty-leg offer went live. Here is the eight-step routine that stopped it.<\/p>\n","protected":false},"author":7,"featured_media":1408,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[916],"tags":[],"class_list":["post-1407","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aviation-industry"],"_links":{"self":[{"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/posts\/1407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/comments?post=1407"}],"version-history":[{"count":1,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/posts\/1407\/revisions"}],"predecessor-version":[{"id":1531,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/posts\/1407\/revisions\/1531"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/media\/1408"}],"wp:attachment":[{"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/media?parent=1407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/categories?post=1407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jetexe.com\/blog\/wp-json\/wp\/v2\/tags?post=1407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}