Rate limiting & resilience · TL;DR
1 min readTL;DR
Rate limiting and resilience patterns exist for the same reason: capacity is finite, and a system that accepts more work than it can finish gets slower for everyone until it fails for everyone. Rate limiting caps how much a single client may ask for — token bucket for bursty-but-bounded traffic, sliding window for smooth fairness — and answers the rest with HTTP 429. Backpressure and load shedding protect the service itself when the total is too high. Timeouts, retries with budgets, circuit breakers and bulkheads stop one slow dependency from dragging the whole call graph down. Graceful degradation decides in advance what to drop so the core journey keeps working. The recurring enemy is the cascading failure: a small slowdown that retries and queues amplify into an outage.