Catalogue / stripe-2017-api-rate-limiters

Stripe protects its API with a per-user request limiter, a concurrency limiter and two load shedders, with rate limiting built on Redis

Stripe, 2017. API rate limiters and load shedders.

Organisation
Stripe
Evidence
Reported from production
Source
Scaling your API with rate limiters

Stripe blog, published 2017-03-30

Records

Decision#d1

Limit each user's request rate with a token bucket in Redis, identically in test and live modes, allowing short bursts

Decision#d2

Cap the number of requests a user may have in progress at once, to protect expensive endpoints

Decision#d3

Reserve part of the fleet for critical API methods and shed lower-priority traffic by category when workers back up

Decision#d4

Introduce rate limiters without disturbing existing users; the post recommends failing open, kill switches and dark launches

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.