RateLimiter

Goals

Security and availability- DDOS

  • Sharing access to limited resources: Requests made to an API where the limited resources are your server capacity, database load, etc.

  • Limiting the number of second factor attempts that a user is allowed to perform, or the number of times they’re allowed to get their password wrong.

Network layer DOS

Application layer DOS

COGS

  • Certain services might want to limit actions based on the tier of their customer’s service, and thus create a revenue model based on rate limiting.

Real world rate limiters

Ratelimiter within Resiliency4J

Rate limit threshold

Netflix concurrency limits

Resiliency 4j

Ratelimiter within CloudBouncer

Redis cell rate limiter

Implementations

  • Github API rate limiting

  • Bitly API rate limiting

  • LinkedIn rate limiting

Last updated