forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
token bucket: new atomic token bucket implementation (envoyproxy#34789)
Commit Message: token bucket: new atomic token bucket implementation Additional Description: The main target of this new token bucket is to replace the timer based token buckets in the local rate limit filter. **The timer based one depends on the main thread to do the refilling periodically. If the main thread is occupied by other tasks, the token buckets won't be refreshed in timely and will effects users' traffics directly.** See envoyproxy#34774. Actually, I don't know why we design the token bucket with the timer at the initial local rate limit filter. We had the `SharedTokenBucketImpl` as the thread safe token buckets. So, I assume may be we don't want the lock in the local rate limit filter? Risk Level: low, only new implementation of token buckets but haven't been used. Testing: unit. Docs Changes: n/a. Release Notes: n/a. Platform Specific Features: n/a. --------- Signed-off-by: wbpcode <[email protected]> Signed-off-by: wbpcode <[email protected]> Co-authored-by: wbpcode <[email protected]>
- Loading branch information
Showing
4 changed files
with
300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters