failsafe-lib / failsafe

Fault tolerance and resilience patterns for the JVM
https://failsafe.dev
Apache License 2.0
4.17k stars 296 forks source link

Ratelimiter implementation #313

Closed jhalterman closed 2 years ago

jhalterman commented 2 years ago

A rate limiter with smooth and bursty variants, where the policy makes you choose one or the other. Has an optional timeout (for waiting on permits). The rate limiter can be used in a standalone way or as part of a Failsafe execution.

See:

Since this impl doesn't include a warmup period, I'll open a separate issue for that to add later.

Closes #308