skip to content

For a ticket sale that will send fifty times normal traffic to a function-backed API, how do you decide between raising quotas, pre-starting capacity and metering users in?

level: principalimportance: should knowfreq 32%

answer

  1. ceiling, slope, arrival rate
  2. idle capacity has a bill
  3. the binding limit may be downstream
  4. a known start time helps

basics

~20 s

Weigh what a throttled launch costs against what idle capacity and a waiting room cost. A quota raise lifts the ceiling, pre-started capacity skips the ramp but bills while idle, and metering protects every downstream at the price of user waits.

solid answer

~50 s

Each lever moves a different limit. A **quota increase** lifts the ceiling; it is cheap but needs lead time, does nothing for the scale-up ramp, and also raises how far a runaway function can go. **Pre-started capacity**, pre-provisioned instances or a minimum instance count scheduled for the sale window, skips the ramp and cold starts, but it bills while idle and only works if you know when the spike comes. **Metering users in** with a waiting room or queue caps the arrival rate at what the fleet and the ticket inventory store can take, at the cost of visible waits and one more component to run. The choice turns on what a failed launch costs, how predictable the spike is, and which limit really binds, often a downstream store rather than the functions. Many teams combine them: raise the quota, pre-start the hot path for the window, and meter as the backstop.

go deeper

for a junior

Recall that there are several ways to prepare for a traffic spike and that each one fixes a different limit.

for a middle

Explain which lever moves the ceiling, which moves the ramp, and which controls the arrival rate itself.

for a senior

Show that you would let a spike test decide which limit binds, often a downstream store, before choosing what to pay for.

for a principal

Own the trade: the cost of a failed launch against idle capacity and user waits, layered levers for known events, and turning everything off or bounding it afterwards.

## The decision in front of a lead A known event, a ticket sale, a product drop or a marketing send, is about to push fifty times normal traffic at a function-backed API within a minute. The function platform imposes a **regional concurrency quota** (a ceiling on executions running at once) and a **scale-up rate** (a limit on how fast new instances appear). A lead has to decide how much headroom to buy, in what form, and who pays for it. There is no single right answer: it depends on what failure costs, what the event looks like and where the real bottleneck sits. ## The three levers and the limit each moves | Lever | Limit it moves | What it does not fix | |---|---|---| | Raise the regional quota | The ceiling | The ramp; downstream limits | | Pre-start capacity for the window | The ramp and cold starts on the hot path | The ceiling (it usually counts against it); downstream limits | | Meter users in (waiting room, queue, staggered access) | The arrival rate itself, so every limit behind it | The wait users experience; the work it adds | Metering is the **load-leveling** idea applied at the edge of the product. Its pattern-level design belongs to the load-leveling topic; the decision here is whether to use it for this launch. ## What each one costs to keep - **Quota increase.** Usually free to hold, but it needs lead time with the provider, and a higher ceiling also lets a runaway function (a retry storm, a recursive trigger) consume more before anything stops it. It may need per-function caps to keep that risk bounded. - **Pre-started capacity.** Instances kept initialised and ready are billed while they sit idle, whether or not the crowd arrives. That is easy to justify for a two-hour window and hard to justify as a permanent setting. It also needs someone to schedule it on and off and to size it from a test, not a guess. - **Metering.** A waiting room or queue is a component to build or buy, test and operate. Users see a wait, which product and marketing must accept. In exchange, every system behind it, functions, database, payment provider, sees a rate it was sized for. - **Doing nothing extra.** Also a choice: some throttling, client retries with backoff, and an incident if the step is steeper than the ramp. Acceptable when the event is small or failure is cheap. ## Questions that decide it 1. **What does a failed launch cost?** Lost sales, refunds, reputation, a support queue. Set this beside the cost of a few hours of idle capacity. 2. **Is the start time known?** Pre-started capacity only helps if it is running before the spike. A surprise viral moment needs a different answer. 3. **Which limit actually binds?** A spike test tells you. Often the functions are fine and the **ticket inventory store** or the **payment provider** is the ceiling; adding function capacity then only moves the failure. 4. **What experience is acceptable?** If a fair queue is better than random errors, metering is the honest design. 5. **Who owns the knob after the event?** Pre-started capacity and raised quotas that nobody turns off become the next bill or the next runaway. ## Combining them A common plan for a known, high-stakes launch uses all three in layers: - raise the quota well ahead, since it is cheap and has lead time; - pre-start the hot path (page, inventory check, purchase) for the sale window, sized from the spike test; - meter arrivals as the **backstop**, switched on automatically if throttles or downstream errors cross a threshold; - leave everything else to scale on demand. A smaller event might use only the first and accept some retries. A launch whose bottleneck is a fixed inventory store may lead with metering and buy no extra function capacity at all. ## Who owns the decision after launch The lead's job does not end at the event. Record the plan, schedule the pre-started capacity off, decide whether the raised quota stays (and with which per-function caps), and keep the spike test so the next launch starts from evidence. The standing cost of this decision is whatever is left running, financially or as risk, after the crowd has gone.

  • Why can raising the regional quota make a runaway function more expensive?
    The quota is also a safety ceiling. A retry storm or a recursive trigger scales until something stops it; a higher quota lets it run more concurrent executions and bill more before that happens. Per-function caps on functions that do not need the headroom keep the risk bounded.
  • When would you meter users in and buy no extra function capacity at all?
    When a spike test shows the binding limit is downstream, such as an inventory store that cannot take more writes. More function capacity would only push more load at it. Metering at the rate that store sustains protects it and gives users a fair queue instead of errors.

  • A large enough quota increase alone makes any launch spike safe.
  • Pre-started capacity costs nothing extra because it bills only when invoked.
  • A waiting room is a sign of failure and should never be used.
  • The function fleet is always the binding limit during a launch.
  • Capacity pre-started for one launch should be left on permanently to be safe.