fix: don't trigger scale-down if already at min replicas
checkAndScale was deciding to scale-down based on avgLoad without checking if already at minimum replicas. This caused unnecessary scale-down attempts that would fail and log noise. Add check: only scale-down if instances.size > scaleMinReplicas Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ class AutoScaler:
|
||||
avgLoadRef.set(avgLoad)
|
||||
|
||||
if avgLoad > config.scaleUpThreshold * config.maxGamesPerCore then scaleUp()
|
||||
else if avgLoad < config.scaleDownThreshold * config.maxGamesPerCore then scaleDown()
|
||||
else if avgLoad < config.scaleDownThreshold * config.maxGamesPerCore && instances.size > config.scaleMinReplicas then scaleDown()
|
||||
|
||||
def scaleUp(): Unit =
|
||||
log.info("Scaling up Argo Rollout")
|
||||
|
||||
Reference in New Issue
Block a user