-
Notifications
You must be signed in to change notification settings - Fork 40
Adaptive rate control enhancement #1135
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
Open
seankao-az
wants to merge
23
commits into
opensearch-project:main
Choose a base branch
from
seankao-az:adaptive-rate-control-enhance
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adaptive rate control enhancement #1135
seankao-az
wants to merge
23
commits into
opensearch-project:main
from
seankao-az:adaptive-rate-control-enhance
Conversation
This file contains hidden or 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
Signed-off-by: Sean Kao <seankao@amazon.com>
default config is NOT updated for this change Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
- remove testing guava rate limiter behavior - add test for getting rate limiter instance - stub clock for testing - test feedback instead of rate adjustment in bulk wrapper test - disambiguous request feedbacks Signed-off-by: Sean Kao <seankao@amazon.com>
fix bug for increase rate with stabilization; slightly modify estimate rate to allow for setting threshold as 0 to disable stabilization Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com> experiment better Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
- remove requestSize from RequestFeedback - decrease cooldown minor change for simpler test case - fix test cases for 10 seconds sliding window for rate estimation Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
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.
Description
Built upon the existing rate limiter:
Adding the following enhancements:
RequestRateMeter
estimates current rate with a sliding window of size 10s (previously 3s). This is to account for burst permits allowed by guava rate limiter. A slightly larger window will result in less fluctuation in current rate estimation.Some notes on code changes:
java.time.Clock
instead ofSystem.currentTimeMillis()
for tracking time for some classes, for stubbing clock in tests.Infra:
sbt integtest/integration
intosbt test integtest/integration
in the workflow. This makes the CI runtime into 41 min (from 38 min)RetryableHttpAsyncClientSuite
OpenSearchClientUtilsSuite
— it passes when it's run by itself but always fail when run insbt test
. Will update in Not all tests are run in CI #1097 to track thisRelated Issues
Check List
--signoff
backport 0.x
label if it is a stable change which won't break existing featureBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.