Skip to main content

Overview

Every crew or flow you deploy runs as three pods:
  • Web accepts kickoffs and status calls.
  • Worker runs the executions.
  • Redis holds the execution queue and run state.
The deployment’s instance size sets the worker’s CPU and memory, the Redis limit, and how many executions the worker runs at the same time. The web pod is the same for every size. There are six sizes: Small, Regular, Large, Extra-large, Extra-extra-large, and Insane-large. A deployment without an explicit size is Regular.
On Factory, each deployment runs one worker pod. Worker autoscaling is not available on Factory installs, so a deployment’s capacity comes from its size alone. To run more executions at once, move the deployment to a larger size.

Sizes

These values apply to the no-build provider (envVars.PROVIDER: KUBERNETES_V3), the default since chart 0.12.0. For crews still on BuildKit, see BuildKit provider. These values are the same for every size:
  • Web: request 200m CPU / 512 MiB, limit 1 CPU / 1.5 GiB. The web pod is a single Python process and does not get faster with a larger size.
  • Redis request: 50m CPU / 256 MiB. Only the Redis limit grows with the size.
Before chart 0.20.0 (AMP 0.34), the Redis request was equal to the Redis limit divided by 1.5 (for example 500m / 4 GiB on Regular) instead of 50m / 256 MiB. On older charts, add the difference to the node capacity you plan for.

Reading the table

  • Request is what Kubernetes reserves for the pod on a node. The scheduler and the cluster autoscaler count requests, so the sum of requests across all deployments is the node capacity you need. The last column adds up the requests of the web, worker, and Redis pods of one deployment.
  • Limit is the ceiling. Above the CPU limit the pod is throttled. Above the memory limit the container is OOM-killed, and the executions running in it fail.
  • Worker CPU request is a sixth of the size’s base CPU, because workers spend most of their time waiting on LLM and tool calls. A busy worker can use CPU up to its limit when the node has spare capacity.
  • Concurrent executions is how many executions one worker runs at the same time. It is the worker’s memory request divided by the memory budget per execution, rounded down: 500 MiB at the standard memory level, 1000 MiB at high. Kickoffs beyond that wait in the Redis queue until a slot frees up.

Changing a deployment’s size

  • When you deploy: the Instance Size section of the deploy-from-code form offers Default (Regular), Large, Extra-large, Extra-extra-large, and Insane-large.
  • After the deploy: a Factory admin can change the size, including Small, and the memory level from the deployment’s row on the organization page of the admin panel. The change is saved immediately but only reaches the pods on the deployment’s next deploy, so redeploy it to apply the new size.
Use the high memory level for crews that load large files, documents, or models into memory. It halves the concurrency so each execution gets 1000 MiB of the worker’s memory instead of 500 MiB.

BuildKit provider

Crews still deployed with BUILDKIT_KUBERNETES use a different mapping. The worker grows linearly with the size, and Redis is fixed. The web pod is the same as on the no-build provider. Redis requests 250m CPU / 2 GiB on every size and has no limit.
On BuildKit, concurrency uses the same values as on the no-build provider, but the worker memory limit grows more slowly. From Large up, a worker running at full concurrency has less memory per execution: 384 MiB on Large, 256 MiB on Extra-large. For memory-heavy crews on BuildKit, set the memory level to high or migrate to the no-build provider.

Reference