Cross instances local rate limit filter
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 437
Description
*Title*: *Cross instances local rate limit filter*
*Description*:
Local rate limit works more stable and has no additional dependency. It basically is our first choice to do rate limiting.
The only shortage of local rate limit is that the token bucket configuration works independently in different Envoy instances.
This means the replica number of Envoy will effect the final throughout of limiter.
It's not friendly for users who don't know the technology details. And the replica number may be changed dynamically.
But the Envoy actually could know the replica number of it self, by the local cluster.
So, I think it's possible to let all Envoy instances (in same gateway cluster or in same service of mesh) to share a token bucket. Every instance will be pre-allocated part of the bucket quantitative by specific algorithm. (for example, even allocation.) And when the membership of local cluster is changed, we re-execute the algorithm again.
[optional *Relevant Links*:]
>Any extra documentation required to understand the issue.
Contributor guide
Assessment
This issue has not been assessed yet.