sentry
sentry copied to clipboard
feat(rate-limiting): leaky bucket rate limiter
Leaky bucket rate limiter which allows for defining both max burst rate as well as sustained rate limit.
- While the bucket is not yet full, the requests are accepted until it's full (bucket size = max burst limit)
- When the bucker is full, new request are accepted only after a drop drips out (drip rate = sustained rate limit)
This is a metered (i.e. counter) implementation, which is far less resource heavy, but only limits the traffic, doesn't attempt to smooth it out.