-
Notifications
You must be signed in to change notification settings - Fork 8
AER-4020 Added configuration option to set max number of workers available #118
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
Hilbrand
wants to merge
1
commit into
aerius:main
Choose a base branch
from
Hilbrand:AER-4020-max-workers-available
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,9 +91,10 @@ The json format of the configuration files is as follows: | |
| ``` | ||
| { | ||
| "workerQueueName": "<type of the queue>", | ||
| "durable" : <true|false> | ||
| "eagerFetch" : <true|false> | ||
| "queueType": <classic|quorum|stream> | ||
| "durable" : <true|false>, | ||
| "eagerFetch" : <true|false>, | ||
| "queueType": <classic|quorum|stream>, | ||
| "maxWorkersAvailable": <number>, | ||
| "queues": [ | ||
| { | ||
| "queueName": "<client queue name>", | ||
|
|
@@ -115,7 +116,7 @@ Some queues can have derived messages on the queue, that are recreated by the pa | |
| For these queues it would make sense to not make them durable. | ||
| RabbitMQ will require less storage space/IOPS and be faster as it won't need to depend on disk I/O for these queues. | ||
|
|
||
| The parameter `eagerFetch` indicates that all tasks on the queue will be prefetched. | ||
| The parameter `eagerFetch` (optional) indicates that all tasks on the queue will be prefetched. | ||
| If not set or set to false it will only fetch a single task from the queue. | ||
| By fetching all tasks from the queue as they arrive it can give different priorities to all tasks put on the same queue. | ||
| Effectively it will give tasks on the same queue that have fewer tasks running on a worker a higher priority over tasks with more tasks running on a worker. | ||
|
|
@@ -128,6 +129,15 @@ If `durable` is true queues will be set to `classic` (or default if not set) bec | |
| Changing the `queueType` configuration parameter if the queues are already created won't work. | ||
| If `queueType` needs to be changed, the queues need to be deleted first. | ||
|
|
||
| The parameter `maxWorkersAvailable` (optional) can be set to the maximum number of workers the system can scale to when using automatically scaling of workers. | ||
| This is useful because when worker resources are automatically scaled it can cause issues in combination with a low `maxCapacityUse` parameter. | ||
| For example if worker scaling is based on the percentage workers being used it can mean the system will never scale up because the `maxCapacityUse` for certain input queues will never exceed the scaling threshold percentage. | ||
| Especially when the system runs with a low number of workers the `maxCapacityUse` is easily reached before the scaling threshold is reached. | ||
| By setting `maxWorkersAvailable` the scheduler will determine if tasks already have reached the `maxCapacityUse` value based on the `maxWorkersAvailable` value and not the actual number of workers running. | ||
| It will than schedule tasks beyond the `maxCapacityUse` assuming this would trigger the system to scale up if needed, | ||
| and only for a short amount of time claim more resources for a specific queue than would be allowed by the `maxCapacityUse` percentage. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only for a short time if the |
||
| When more workers would be available than was configured as `maxWorkersAvailable` the scheduler will assign workers proportionally to the `maxCapacityUse` based on the actual number of workers available. | ||
|
|
||
| In `queues` there can be 1 or more queue configurations. | ||
| Each queue configuration consists of 3 parameters: | ||
|
|
||
|
|
||
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.