Skip to content

Commit 1e69599

Browse files
committed
chore(infra): right-size api-private autoscaling
api-private was pinned at 4/4 max: it's a near-idle internal API (CPU ~1m) whose ~470Mi memory is a flat per-pod Node baseline, not load-driven. Using memory as an HPA driver against an undersized 350Mi request held utilization near the 150% target so the formula never recommended scaling down. Drop memory from the HPA (CPU-only scaling; memory safety is the 630 heap cap + 700 limit), raise minReplicas to 2 for HA, and right-size the request to 500Mi to match real usage. Settles at ~2 pods instead of 4.
1 parent 32c7d40 commit 1e69599

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.infra/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,18 +512,18 @@ if (isAdhocEnv) {
512512
{ name: 'ENABLE_PRIVATE_ROUTES', value: 'true' },
513513
...jwtEnv,
514514
],
515-
minReplicas: 1,
515+
minReplicas: 2,
516516
maxReplicas: 4,
517517
requests: {
518-
memory: '350Mi',
518+
memory: '500Mi',
519519
cpu: '10m',
520520
},
521521
limits: {
522522
memory: `${privateMemory}Mi`,
523523
},
524524
readinessProbe,
525525
livenessProbe,
526-
metric: { type: 'memory_cpu', cpu: 200, memory: 150 },
526+
metric: { type: 'memory_cpu', cpu: 200 },
527527
createService: true,
528528
service: {
529529
type: 'LoadBalancer',

0 commit comments

Comments
 (0)