-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for leaky bucket throttling (rps + burst) in ffresty client #141
Conversation
Signed-off-by: Chengxuan Xing <[email protected]>
…-config Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
@EnriqueL8 thanks for the review. Replied to your comments |
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
Signed-off-by: Chengxuan Xing <[email protected]>
…-config Signed-off-by: Chengxuan Xing <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great that there's a leaky bucket algorithm built into Go to plug in here 🎉
One request on the configuration split.
Signed-off-by: Chengxuan Xing <[email protected]>
@peterbroadhurst comments addressed |
Signed-off-by: Chengxuan Xing <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Chengxuan for the extra spelling round there - looks great
Adding
throttle
section as a configuration so the ffresty client can submit requests at certain rates using leaky bucket style throttling control.Note: this option is not optimal if other clients are using the REST endpoint under the same rate limit bucket.
To handle scenarios like that, we should update ffresty client to be Retry-after header aware or allow users to provide custom handling logic if they use different standards.