Display Helm Chart Values
1. Adjust Base Resources
Tune replicas and resource limits based on workload, cluster capacity, database connection limits, and queue backlog.
Base configuration example:
2. Split Workers by Queue
In 3.9.x, the Helm chart supportsadditionalWorkers. It splits Celery queues that were previously handled by the default worker into dedicated Deployments. Each worker can have its own replicas, CPU, memory, and scheduling policy.
The default worker is a catch-all worker and consumes all queues. After enabling additionalWorkers, use one of the following patterns:
- Conservative mode: keep
worker.enabled: trueand only enable dedicated workers for hot queues. The default worker continues to consume queues that have not been split out. - Full split mode: set
worker.enabled: falseand make sure every queue used by your deployment is consumed by an enabledadditionalWorkersentry. Otherwise, background tasks in uncovered queues will accumulate.
Conservative mode example:
- If concurrency is high or a queue backlog is visible, increase the corresponding worker’s
replicasfirst. - If a single task is memory-heavy, memory usage stays close to the limit, or pods are OOMKilled, increase the corresponding worker’s memory limit.
- Do not blindly increase
celeryWorkerAmount. It increases per-pod concurrency and may increase database connections, Redis connections, and memory usage. - Keep
workerBeatat one replica. It schedules tasks but does not replace worker queue consumers.
3. Improve External Postgres Performance
Estimate requiredmax_connections from API and worker concurrency:
- API: replicas=2, serverWorkerAmount=1
- Default worker: replicas=4, celeryWorkerAmount=1
SQLALCHEMY_POOL_SIZE=100SQLALCHEMY_MAX_OVERFLOW=150