Skip to content

Cap prod app node pool at 3 and stop memory-based autoscaling - #1065

Merged
arielr-lt merged 1 commit into
masterfrom
fix/prod-main-app-mem-rightsizing
Aug 17, 2026
Merged

Cap prod app node pool at 3 and stop memory-based autoscaling#1065
arielr-lt merged 1 commit into
masterfrom
fix/prod-main-app-mem-rightsizing

Conversation

@arielr-lt

@arielr-lt arielr-lt commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Context

Prod EKS cluster ce-registry-eks raised an IP-exhaustion health alert (#1063). Root cause was a feedback loop, not a networking capacity problem.

Root cause

The main-app HPA scaled on memory utilization. Since main-app memory grows with pod uptime rather than with load, the HPA kept adding replicas chasing that growth → cluster-autoscaler added nodes → each node reserved a VPC-CNI warm pool of IPs → the /24 private subnet in us-east-1b dropped to ~8 free addresses → EKS health alert.

Changes

File Change Why
app-hpa.yaml remove the memory metric (CPU-only); minReplicas 2, maxReplicas 4 Autoscaling tracks real load instead of the leak; pod count can't overrun the node pool
terraform.tfvars ng_prod_v2 cap min 2 / max 3.

Memory request/limit are left unchanged (3560Mi / 8Gi) so the app's memory growth stays visible and reproducible rather than being masked. That app-side work is tracked separately by the application team.

Scope

Stabilization to keep the cluster patchable ahead of the 2026-08-19 EKS platform patch. Relates to #1063.

Prod EKS raised an IP-exhaustion health alert (issue #1063). Root cause
was the main-app HPA scaling on memory: main-app memory grows with pod
uptime rather than load, so the HPA kept adding replicas chasing it,
which added nodes, which reserved subnet IPs and exhausted the /24 in
us-east-1b.

Changes:
- app-hpa: remove the memory metric (scale on CPU only) and set replicas
  to min 2 / max 4 so the pod count can't overrun the node pool.
- terraform.tfvars: cap ng_prod_v2 at min 2 / max 3 (was max 8) so the
  node pool can't scale up unbounded. Agreed with the platform owner.

Memory request/limit left unchanged so the memory growth stays visible
and reproducible. The underlying app memory work is tracked separately
by the application team.
@arielr-lt
arielr-lt force-pushed the fix/prod-main-app-mem-rightsizing branch from 04186c6 to 5cfa10e Compare August 14, 2026 14:30
@arielr-lt arielr-lt changed the title Right-size prod main-app memory request & stop memory-based autoscaling Cap prod app node pool at 3 and stop memory-based autoscaling Aug 14, 2026
@arielr-lt
arielr-lt merged commit c30d127 into master Aug 17, 2026
12 checks passed
@arielr-lt
arielr-lt deleted the fix/prod-main-app-mem-rightsizing branch August 17, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants