-
Notifications
You must be signed in to change notification settings - Fork 618
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
Add ratelimiter for fault injection handlers #4340
Merged
Merged
Conversation
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
harishxr
force-pushed
the
fis-ratelimiter
branch
from
September 16, 2024 23:50
5b7f050
to
cbac251
Compare
harishxr
force-pushed
the
fis-ratelimiter
branch
from
September 16, 2024 23:53
cbac251
to
dec0d09
Compare
xxx0624
reviewed
Sep 17, 2024
harishxr
force-pushed
the
fis-ratelimiter
branch
4 times, most recently
from
September 18, 2024 20:43
4b62271
to
7431dc5
Compare
harishxr
force-pushed
the
fis-ratelimiter
branch
from
September 18, 2024 20:59
f27a220
to
1e79b26
Compare
xxx0624
reviewed
Sep 18, 2024
mye956
reviewed
Sep 18, 2024
mye956
previously approved these changes
Sep 18, 2024
xxx0624
previously approved these changes
Sep 18, 2024
harishxr
force-pushed
the
fis-ratelimiter
branch
from
September 19, 2024 00:27
3700de4
to
56a80f9
Compare
harishxr
force-pushed
the
fis-ratelimiter
branch
from
September 19, 2024 04:20
6909f15
to
52511b9
Compare
xxx0624
approved these changes
Sep 19, 2024
mye956
approved these changes
Sep 19, 2024
mye956
pushed a commit
to mye956/amazon-ecs-agent
that referenced
this pull request
Oct 3, 2024
* Add ratelimiter for fault injection handler * Add integ tests and refactor code * Refactor integ test & ratelimiter setup * Refactor tests to table driven tests * Add execWrapper to integ tests * Add dynamic port allocation --------- Co-authored-by: Harish Senthilkumar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a tollbooth ratelimiter to the Fault Injection handlers, enforcing a request limit to control how frequently fault injection operations can be triggered.
Implementation details
createRateLimiter
is used to create a new tollbooth rate limiter with rate limit of 0.2 ( 1 request per 5 seconds).Testing
429 error
.TestRateLimiterIntegration
integration test has been added as well to ensure the rate limiter works as expected.New tests cover the changes: yes
Description for the changelog
Add ratelimiter for fault injection handlers
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
Does this PR include the addition of new environment variables in the README?
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.