Skip to content

feat(server): bump MAX_CONCURRENT_TASKS default 3 → 5 (TAB-966)#452

Closed
srbiv wants to merge 1 commit into
mainfrom
stafford/tab-966-pilo-scale-on-cap-utilization
Closed

feat(server): bump MAX_CONCURRENT_TASKS default 3 → 5 (TAB-966)#452
srbiv wants to merge 1 commit into
mainfrom
stafford/tab-966-pilo-scale-on-cap-utilization

Conversation

@srbiv
Copy link
Copy Markdown
Collaborator

@srbiv srbiv commented May 15, 2026

Summary

Bumps the in-code default MAX_CONCURRENT_TASKS from 3 to 5.

The previous default of 3 was sized against the memory math in TAB-964, which framed per-task memory as ~300-400MB assuming in-pod Chromium browsers. In practice the pod connects to a remote browser pool over CDP — per-task memory in the pilo pod is much smaller (JS heap, CDP buffers, ARIA snapshots, LLM context). 5 is comfortable on the 2Gi pod limit that the companion infra change lands.

Companion change

webservices-infra branch sbrooke/tab-966-pilo-scale-on-cap-utilization:

  • bumps prod and stage pod memory limit/request to 2Gi
  • replaces the unreachable averageValue: 1600Mi HPA threshold with averageUtilization: 40 so HPA actually fires before the cap is hit
  • lowers CPU threshold 80 → 60
  • adds behavior.scaleUp for fast burst response
  • pins MAX_CONCURRENT_TASKS=5 in the configmap so deploys are explicit rather than relying on this code default

Deploy ordering

Land the infra change first so cap=5 has memory headroom before the pilo image rolls out.

Test plan

  • pnpm run check passes — 8 server test files, 96 tests; cli/extension/core all green
  • Deploy infra change first (2Gi memory)
  • Deploy this PR to stage
  • Drive synthetic load and confirm HPA scales as memory utilization crosses 40% on the 2Gi pods

Refs: TAB-966, TAB-964

The previous default of 3 was sized against the memory math in TAB-964,
which assumed in-pod Chromium browsers (~300-400MB each). In practice the
pod connects to a remote browser pool over CDP and per-task memory in the
pod is much smaller. 5 is comfortable on the 2Gi pod limit that the
companion webservices-infra change lands.

Companion infra change pins MAX_CONCURRENT_TASKS=5 in the configmap so
deploys are explicit about the cap rather than relying on this default.

Refs: TAB-966, TAB-964
@srbiv srbiv force-pushed the stafford/tab-966-pilo-scale-on-cap-utilization branch from 72a7b1e to 3c735a0 Compare May 15, 2026 21:03
@srbiv srbiv changed the title feat(server): scale on pilo.tasks.utilization — expose OTel gauges for HPA (TAB-966) feat(server): bump MAX_CONCURRENT_TASKS default 3 → 5 (TAB-966) May 15, 2026
@srbiv srbiv closed this May 15, 2026
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