Expand description
Admission-based rate limiting for throughput and bandwidth.
This module provides RateLimiter, which enforces configurable limits at three
levels of granularity — global, per-usecase, and per-scope — for both request
throughput (requests/s) and upload/download bandwidth (bytes/s).
Throughput is enforced using token buckets; bandwidth is estimated with an exponentially weighted moving average (EWMA) updated by a background task every 50 ms. All rate-limit checks are synchronous and non-blocking.
Structs§
- Bandwidth
Limits - Bandwidth limits applied at global, per-usecase, and per-scope granularity.
- Rate
Limiter - Combined rate limiter that enforces both bandwidth and throughput limits.
- Rate
Limits - Rate limits for objectstore.
- Throughput
Limits - Request throughput limits applied at global, per-usecase, and per-scope granularity.
- Throughput
Rule - An override rule that applies a specific throughput limit to matching request contexts.