Skip to content
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

Support server level consumption throttle #12292

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Jan 21, 2024

Support server level consumption throttle:

  1. Add new server config: to allow throttle realtime consumption speed at server level
  2. Add new metric to count on server level realtime consumption rate.
  3. Ratelimiter is based on the metric from 2.
  4. Server Ratelimiter is one per RealtimeConsumptionRateManager, which is inside the InstanceHolder.

Release Notes:

Support server level consumption throttle:
- Add new server config: `pinot.server.consumption.rate.limit` to allow throttle realtime consumption speed at server level
- Default limit is 0, which means the server rate limiter is disabled.

@xiangfu0 xiangfu0 added feature release-notes Referenced by PRs that need attention when compiling the next release notes labels Jan 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (35faeb6) 61.58% compared to head (9be0311) 61.60%.
Report is 1 commits behind head on master.

Files Patch % Lines
...g/apache/pinot/common/metrics/AbstractMetrics.java 0.00% 3 Missing ⚠️
.../pinot/server/starter/helix/BaseServerStarter.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12292      +/-   ##
============================================
+ Coverage     61.58%   61.60%   +0.01%     
+ Complexity     1153     1152       -1     
============================================
  Files          2417     2417              
  Lines        131611   131631      +20     
  Branches      20317    20318       +1     
============================================
+ Hits          81057    81087      +30     
+ Misses        44613    44599      -14     
- Partials       5941     5945       +4     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (ø)
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 61.54% <82.60%> (+0.01%) ⬆️
java-21 61.48% <82.60%> (+0.02%) ⬆️
skip-bytebuffers-false 61.57% <82.60%> (+<0.01%) ⬆️
skip-bytebuffers-true 61.45% <82.60%> (+0.02%) ⬆️
temurin 61.60% <82.60%> (+0.01%) ⬆️
unittests 61.59% <82.60%> (+0.01%) ⬆️
unittests1 46.71% <86.36%> (+0.02%) ⬆️
unittests2 27.73% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangfu0 xiangfu0 changed the title WIP: Support server level consumption throttle Support server level consumption throttle Jan 22, 2024
@xiangfu0 xiangfu0 force-pushed the node-level-rate-limiter branch 2 times, most recently from b3095ba to 092af42 Compare January 22, 2024 06:10
Copy link
Contributor

@snleee snleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

LGTM!

QQ: This will require the server restart to change the value. Is my understanding correct?

Copy link
Contributor

@sajjad-moradi sajjad-moradi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A couple of comments though:

  1. Can you please update the main class documentation to reflect the new addition?
  2. The additional logic is straight-forward. Do we really need an integration test? Having more tests in general is good, but this test adds a few minutes to the runtime of the test suits, and I'm not sure if it's worth incurring the cost.

@xiangfu0
Copy link
Contributor Author

Thank you for adding this!

LGTM!

QQ: This will require the server restart to change the value. Is my understanding correct?

True, we can support the runtime change in the next PR.

@xiangfu0
Copy link
Contributor Author

xiangfu0 commented Jan 23, 2024

LGTM. A couple of comments though:

  1. Can you please update the main class documentation to reflect the new addition?
  2. The additional logic is straight-forward. Do we really need an integration test? Having more tests in general is good, but this test adds a few minutes to the runtime of the test suits, and I'm not sure if it's worth incurring the cost.
  1. will do
  2. I feel it's necessary for this one and we may want to add more tests later on for bytes-based throttling etc.
    Also we should take a look and deprecate/consolidate some tests if possible.

@xiangfu0 xiangfu0 added Configuration Config changes (addition/deletion/change in behavior) ingestion labels Jan 23, 2024
@xiangfu0 xiangfu0 merged commit f43664d into apache:master Jan 24, 2024
19 checks passed
@xiangfu0 xiangfu0 deleted the node-level-rate-limiter branch January 24, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Config changes (addition/deletion/change in behavior) feature ingestion release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants