Skip to main content

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:
workerBeat should always run as a single replica. Do not scale it horizontally.

2. Split Workers by Queue

Use additionalWorkers to run selected Celery queues in dedicated Deployments. Key each entry by worker name. When you override only some fields, such as replicas, the remaining fields keep their chart defaults. The main worker consumes the queues in worker.celeryQueues. Of the additionalWorkers entries, the chart enables only trigger-worker by default. By default, only the Evaluation worker consumes the evaluation queue. It isn’t an additionalWorkers entry. The chart deploys it only when evaluation.enabled is true. Choose one of the following deployment patterns:
  • Conservative mode: keep worker.enabled: true and 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: false and make sure every queue used by your deployment is consumed by an enabled additionalWorkers entry, or, for evaluation, by the Evaluation worker. Otherwise, background tasks in uncovered queues will accumulate.
Common worker splits:
If your values file still uses a list, migrate it before upgrading.
Conservative mode example:
This is a partial values override, not an exclusive queue routing example. When you split out queues while keeping the main worker enabled, remove those queues from worker.celeryQueues if they should be handled only by the dedicated worker. Full split mode example:
The example keeps the chart default for the trigger worker. Before disabling the main worker, verify that each queue your deployment uses has an enabled consumer. Recommendations:
  • If concurrency is high or a queue backlog is visible, increase the corresponding worker’s replicas first.
  • 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 workerBeat at one replica. It schedules tasks but does not replace worker queue consumers.

3. Improve External Postgres Performance

Estimate required max_connections from API and worker concurrency:
Include the last term only when evaluation.enabled is true. Example:
  • API: replicas=2, serverWorkerAmount=1
  • Default worker: replicas=4, celeryWorkerAmount=1
  • SQLALCHEMY_POOL_SIZE=100
  • SQLALCHEMY_MAX_OVERFLOW=150
Reserve 20-30% headroom for traffic spikes. In this example, set max_connections to 1800-2000 or higher, and confirm that your database instance can support it.

4. Performance Monitoring