API Gateway Platform · View 14 of 21 · Runtime
Decisions
- All four scopes must pass. A request satisfying its credential limit while its tenant is over its plan ceiling is refused, and the error says which.
- Local buckets admit optimistically and reconcile against the shared counter, which is what buys the ≤ 2% overshoot at a 5 ms budget (ADR-05).
- Shedding is by plan tier and is recorded — a free-tier caller shed during an overload should be able to see that it happened.
Numbers
- ≤ 2% overshoot at p99 for shared counters; hard plan ceilings exact within 1 s (assumptions).
- Limit headers on every response, not only on 429, so a well-behaved client can pace itself before it is refused.
Risks
- A hot tenant can saturate a counter shard. Sharding by principal rather than by route is the mitigation, and the shard key is the thing to re-examine when a single tenant exceeds a few percent of global traffic.