implemented EvaluateAndAdjustConcurrency metrics decision maker #168
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.
Change
EvaluateAndAdjustConcurrency evaluates the HTTP response from a server along with the request's response time
and adjusts the concurrency level of the system accordingly. It utilizes three monitoring functions:
MonitorRateLimitHeaders, MonitorServerResponseCodes, and MonitorResponseTimeVariability, each of which
provides feedback on different aspects of the response and system's current state. The function aggregates
feedback from these monitoring functions to make a decision on whether to scale up or scale down the concurrency.
The decision is based on a simple majority of suggestions: if more functions suggest scaling down (return -1),
it scales down; if more suggest scaling up (return 1), it scales up. This method centralizes concurrency control
decision-making, providing a systematic approach to managing request handling capacity based on real-time
operational metrics.
Type of Change
Checklist