Add app param to ignore manual replica count scaling #3737
Closed
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.
What is the feature/update/fix?
Feature: Added App Parameter to Ignore Manual Desired Count Scaling
We have introduced a new app parameter,
IgnoreManualScaleCount
, which allows you to control whether manually set desired counts are ignored when autoscaling is enabled. This parameter can be set toYes
orNo
, with the default beingNo
.Why is this important?
When autoscaling is enabled with targets configured in the
convox.yml
file, services will scale based on those targets. The desired count is defined in thescale
section ofconvox.yml
. If thescale
specifies a range, the desired count defaults to the lower end of the range, which represents the minimum count the service should maintain.For example, with the following configuration, the desired count is set to 4 by default:
In this configuration, the service will maintain a minimum of 4 instances and can scale up to 10 based on the specified targets (CPU, memory, and requests).
If you manually scale a service using:
This command sets a new desired count. The service will temporarily adjust to this manually set count, but as the autoscaler monitors the target metrics, it may adjust the active count again based on those targets. This manually set desired count will persist through redeployments, overriding any count set in the
convox.yml
file.By setting
IgnoreManualScaleCount
toYes
, the desired count fromconvox.yml
will not be considered, and the autoscaler will maintain the active count dynamically, persisting even through redeployments. This is particularly useful in environments where you want the service count to be fully managed by the autoscaler without manual interventions resetting the desired state.How to use it?
Set the
IgnoreManualScaleCount
parameter toYes
orNo
:Verify that the parameter is set:
This command will display the current app parameters, confirming that
IgnoreManualScaleCount
is set correctly.Check the Desired Count and Scaling Configuration:
You can check the desired count using:
This will display the current scaling configuration and counts for your services.
Does it have a breaking change?
There are no breaking changes introduced with this feature.
Requirements
To use this feature, you must be on at least rack version
20240809110958
.You can check your rack's version with the command
convox rack -r rackName
.Update your rack to the latest version with the command
convox rack update -r rackName
.