feat: scale up on high CPU load, not just subscription count

AutoScaler now checks K8s pod metrics (CPU) in addition to subscription count.
Scale-up triggers if:
1. avgLoad > scaleUpThreshold * maxGamesPerCore, OR
2. Any instance has CPU > 800m

Fixes scenario where instance under heavy CPU load wouldn't scale without
high subscription count. Now responds to compute utilization, not just game count.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 23:43:50 +02:00
parent 4b3b5e7c4e
commit 255e2da33c
2 changed files with 38 additions and 2 deletions
@@ -28,7 +28,7 @@ nowchess:
internal:
secret: ${INTERNAL_SECRET:123abc}
coordinator:
max-games-per-core: 500
max-games-per-core: 100
max-deviation-percent: 20
rebalance-interval: 30s
rebalance-min-interval: 60s