airframe
airframe copied to clipboard
airframe-control: RateLimiter
Reference:
- https://www.alibabacloud.com/blog/detailed-explanation-of-guava-ratelimiters-throttling-mechanism_594820
- https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html
- https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/RateLimiter.java
Similar to #1078
Sometimes, determining the max retry count is difficult, so instead, maintaining the average traffic rate at most +20% can be easier to configure.
Related: https://linkerd.io/2/features/retries-and-timeouts/#retry-budgets-to-the-rescue
Implementing per-host rate limiter would be a good starting point.