Scaling your API with rate limiters

https://stripe.com/blog/rate-limiters code

Rate limiting can help make your API more reliable in the following scenarios: 下面几个场景需要 rate limiting 支持


At Stripe, we operate 4 different types of limiters in production. The first one, the Request Rate Limiter, is by far the most important one. We recommend you start here if you want to improve the robustness of your API.

Sorry, your browser does not support SVG.

Sorry, your browser does not support SVG.

We always reserve a fraction of our infrastructure for critical requests. If our reservation number is 20%, then any non-critical request over their 80% allocation would be rejected with status code 503.

Sorry, your browser does not support SVG.

Sorry, your browser does not support SVG.


Building rate limiters in practice