Design a Distributed Rate Limiter

Medium · System Design · about 45 minutes

Asked at Amazon, Cisco, Cloudflare, Coinbase, Google, Lyft, PayPal, Reddit, Robinhood, Stripe, Twilio, X (Twitter), Goldman Sachs, Jane Street, Plaid, Arista Networks, Palo Alto Networks, Okta, SoFi, D. E. Shaw, Zscaler, Brex, Mercury, Susquehanna (SIG), Akamai.

Design a rate limiter used by an API gateway to enforce per-user and per-IP limits (e.g. 100 requests per minute) across a fleet of gateway servers. Requests over the limit receive HTTP 429.

Related guides