Skip to content

listen: lower prod HPA minReplicas 40→30 - #23476

Merged
Git-on-my-level merged 1 commit into
mainfrom
sub/listen-min30
Oct 24, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
sub/listen-min30

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Lower prod backend-listen HPA autoscaling.minReplicas 40 → 30 (maxReplicas stays 60). The 40 floor was the 10-19 incident hardening (listen: raise prod HPA minReplicas 30→40 #22623); measured off-peak load needs only ~31 pods at the 55% CPU target, so 30 (the pre-listen: raise prod HPA minReplicas 30→40 #22623 floor) is enough night headroom and stops paying for ~9 idle pods every night.
  • Peak path untouched: same requests/limits, 55% target, socket guards (16 req / 35 ws per pod), max 60. The floor only binds off-peak; peaks still drive 50–60 pods (pegged at 60 on 10-20).
  • Matching pin: test_backend_listen_helm_defaults.py (40, 60) → (30, 60). The listen: raise prod HPA minReplicas 30→40 #22623 rollout waits stay valid unchanged — a 30-pod floor rolls in fewer waves, not more (test_backend_listen_rollout_wait_can_cover_a_real_rollout passes with the existing 4200s waits and progressDeadlineSeconds: 4200).
  • Expected saving ≈ $1k/mo (~35% of listen node spend) together with the node-pool consolidation: night floor 40 → ~31 pods ⇒ 14 → 11 nodes.

Evidence (read-only, prod, 2026-10-24, listen capacity review §4A)

  • Off-peak fleet 17.4–20.5 cores; at the 55% target that is ~31 pods. HPA status reports "desired replica count is less than the minimum" all night — the 40 floor is pure night waste. Socket guards idle at 4.2 req / 12.4 ws per pod vs 16/35.
  • Peak (10-22/23 14–18Z): fleet 34–38 cores, 50–60 pods — unchanged by this PR.
  • Reconnect-storm check: worst landing = all 635 peak fleet WS on the 30-pod floor = 21 ws/pod vs the 35-socket guard (1.7×); client reconnects are rate-shaped by LISTEN_RECONNECT_BUDGET_PER_MIN=6.

Deploy timing

Apply only after 22Z (listen freeze 13–22Z). Roll out via the normal listen helm workflow.

Product invariants affected

  • INV-DATA-1: path match only (chart values); no data-path behavior change.

Verification

  • BACKEND_UNIT_TEST_FILE_LIST=<list file> BACKEND_PYTEST_WORKERS=4 bash backend/test.sh (contracts, listen helm defaults, release vector): test_workflow_contracts.py 94 passed, test_backend_listen_helm_defaults.py 12 passed, test_verify_backend_release_vector.py 51 passed. Not verified here: an actual prod roll at the new floor.

Rollback

Revert this PR and re-roll the listen helm workflow. Scale-up is fast (50%/15s ≈ 5 pods/15s — back to a 40-pod fleet in ~2 min); the 4200s rollout waits stay valid in both directions.

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Night fleet needs only ~31 pods at the 55% CPU target, so the 10-19
incident floor of 40 (#22623) idles ~9 pods every night. Return the floor
to its pre-#22623 value of 30; peak path (max 60, requests, target, socket
guards) is unchanged. Update the (40, 60) pin in
test_backend_listen_helm_defaults.py; the 4200s rollout waits stay valid
(a 30-pod floor rolls in fewer waves). Saves ~$1k/mo with the pool
consolidation. Apply only after 22Z (listen freeze 13-22Z). Rollback:
revert and re-roll; scale-up 50%/15s (~5 pods/15s) restores 40 in ~2 min.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T07:01:04.365590Z 52efe7a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 699040f into main Oct 24, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the sub/listen-min30 branch October 24, 2026 07:16
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.

1 participant