Budget Alerts and Hard Spend Caps
Most “spend limits” are notifications. They tell a human that money has already left, which is a useful thing to know and is not a limit. A limit refuses the request. An alert is not a cap The distinction is whether the mechanism sits in the request path. An alert reads spend after the fact and pages someone. A cap is a check before the call that can return an error instead of an answer. Only one of them bounds your loss, and the gap between them is measured in the time it takes a person to wake up, understand, and deploy a fix. The failure this protects against is rarely a gradual overrun. It is a loop: an agent that retries forever, a webhook that reprocesses the same document, a bug that resubmits a queue, a scraper that found an unauthenticated endpoint. These do not creep. They run at whatever rate your concurrency allows, which is usually thousands of times your normal rate, and they are indistinguishable from healthy traffic on every dashboard except the cost one. What the lag costs max_loss = burn_rate * detection_lag burn_rate dollars per minute during the incident detection_lag alert delay + notice + diagnosis + deploy Compute burn_rate for your own worst case rather than guessing it: it is concurrency × requests_per_second_per_worker × cost_per_request × 60 . With an assumed 50 concurrent workers each managing 2 requests per second at $0.004 a request, that is 50 × 2 × 0.004 × 60 = $24 per minute . burn = $24/min usage dashboards refresh hourly ...... 60 min alert fires, engineer notices ........ 15 min diagnose, decide ..................... 20 min ship the fix ......................... 15 min total ... 110 min max_loss = 24 * 110 = $2,640 from a single loop bug, with alerting working perfectly. The dominant term is the first one. If your spend data is an hour stale, no amount of alerting discipline gets the loss below an hour’s burn — which is the argument for a cap in the request path, where the lag is zero by construction. The race at the heart of a ca