Load shedding preserves capacity during overload by deliberately dropping lower-priority traffic so critical operations can continue. It protects the system as a whole, rather than merely limiting an individual client. section 4.5.4 section 4.5.6
Apply the technique by:
- Classifying operations by importance, such as treating charge creation as critical and historical-data reads as non-critical. section 4.5.4
- Activating shedding during incidents or traffic spikes, rejecting non-critical work before capacity for critical paths is exhausted. section 4.5.4 section 4.5.6
- Auditing expensive endpoints and background jobs, then separating urgent work from low-priority batches and monitoring queue depth, latency, and failures. section 4.5.6
Layered API protection
Stripe combines per-user request limits and concurrent-request limits with load shedders. Under stress, non-critical historical-data requests are dropped while critical charge-creation requests retain capacity. Rate-limit state is shared through Redis, and equivalent limits run in test mode so behavior appears before production. section 4.5.4
