[Feature]: Relative (percentage of live worker slots) default concurrency limit per project
Author: majewskibartoszCreated Sep 30, 2026Updated Sep 30, 2026
Labels🌟 feature🛠️ area/infrastructure
Problem
AP_DEFAULT_CONCURRENT_JOBS_LIMIT is an absolute integer per project (or per concurrency pool). With horizontal autoscaling a project's ceiling stays fixed while the fleet grows: extra workers never raise per-project throughput until the operator edits the env var and redeploys.
Verified on 0.91.3: system.getNumber uses Number.parseInt, so AP_DEFAULT_CONCURRENT_JOBS_LIMIT=5% boots with only a [validateEnvPropsOnStartup] warning and runs as 5 (/v1/flags reports 5).
The only fleet-relative ceiling today is min(default, live slots of the routed pool) in rate-limiter-interceptor.ts (getMaxConcurrentJobs), and it exists only when workerGroupsEnabled is on. It is 100% of the pool, never a share.
Ref: Pylon 6145
Proposed
- Accept a relative default:
AP_DEFAULT_CONCURRENT_JOBS_LIMIT=5%=ceil(0.05 × live slots of the pool the project routes to)(shared pool, or its worker group), read fromworkerCapacity.get()at dispatch. Floor at 1. A plain integer keeps today's meaning. - Per-project
maxConcurrentJobsand explicit pool limits stay absolute and still win. - Validator: reject a value that is neither an integer nor
<n>%at boot, instead of warning and truncating. - Docs:
environment-variables.mdxentry,manage-concurrency.mdx. While there, replace "exponential backoff": the actual re-check is a flat 20 s plus promotion on slot release.
Source: activepieces/activepieces