Running ByteChef as a Cluster: Coordinators, Workers and Webhook Nodes

On this page
A single ByteChef container is enough for most teams. It stops being enough when automations become part of how the business runs: invoices, order sync, customer onboarding, AI agents that answer customers.
At that point a restart, a traffic spike or a failed server must not stop the work. ByteChef runs distributed from the same image you already use. Each node takes one role, or several, and the roles scale independently.
Why distributed execution matters
Running ByteChef on several nodes is not about raw speed. It is about guarantees that a single process cannot give:
- Scheduled runs happen exactly once. A nightly payroll export must not be skipped because a server restarted, and must not run twice because two servers both thought it was their turn.
- Execution scales without touching the UI. When a batch of 10,000 records arrives, you add workers. The people editing workflows don't notice.
- Public traffic stays isolated. Webhooks from Stripe, Shopify or your own product can get their own nodes, so a burst of events never slows down the API or the editor.
- Maintenance needs no downtime. With more than one coordinator, you restart or upgrade one while the other serves users, and nobody gets logged out.
- It runs on your infrastructure. Regulated teams keep data in their own network, on Docker, Kubernetes or AWS, with the same high availability a hosted service would give.
Three roles, one image
Every ByteChef node runs the same application. Three settings decide what it does, and each defaults to on:
| Role | Variable | What it does |
|---|---|---|
| Coordinator | BYTECHEF_COORDINATOR_ENABLED | Serves the API and UI, coordinates jobs, and runs the scheduler that fires triggers |
| Worker | BYTECHEF_WORKER_ENABLED | Executes tasks such as component actions and scripts. Serves no API |
| Webhook node | BYTECHEF_WEBHOOK_ENABLED | Serves the public webhook, callback, approval and resume endpoints |
Coordinators decide what should run. Workers do the running. Webhook nodes take events from the outside world. Because they are separate, each one scales on its own.
A coordinator serves the webhook endpoints too, so separate webhook nodes are optional. Add them when webhook traffic needs its own capacity, or when you don't want public endpoints on the nodes that serve your UI.
Between the nodes sits a message broker. A single container uses an in-memory broker. A self-hosted cluster uses RabbitMQ or Redis. On AWS, Enterprise Edition can use SQS, with ElastiCache carrying control messages.
The topology
- nginx balances the coordinators and sends webhook paths to the webhook nodes, with the coordinators as backup.
- Coordinators serve the UI and API and run the scheduler.
- Workers execute tasks. They are not behind the load balancer.
- Webhook nodes are optional.
- RabbitMQ or Redis carries every message between the nodes.
- PostgreSQL holds the data and the scheduler's job store.
- migrate is a one-shot service that applies database migrations before any node starts.
What keeps a cluster consistent
Starting several copies of an app is easy. Making them behave like one system is the real work, and it is what separates a cluster from a pile of containers.
One scheduler decision per trigger. Coordinators share the scheduler's job store in PostgreSQL and take a row lock before firing. Each scheduled run starts on exactly one coordinator, even while another is restarting.
The same secrets everywhere. Connections to your CRM, bank or email are stored encrypted. Every node uses the same key, so a connection saved through one coordinator can be used by any worker.
Shared files. Execution logs are written by the worker that ran the task and read by whichever coordinator serves the UI. All nodes see the same file storage: a shared volume, NFS, EFS or S3.
Shared sessions. Login state lives in Redis or PostgreSQL instead of one node's memory (Enterprise Edition). Any coordinator serves any request, and a failed coordinator does not log anyone out.
Fresh data on every node. Each node caches workflows and definitions in memory for speed. When something changes, the change is announced over the message broker (Enterprise Edition), so no node serves an old version.
One migration run. Database migrations run once, before the nodes start, so twenty nodes starting together never race to change the schema.
What each edition includes
| Capability | Community (CE) | Enterprise (EE) |
|---|---|---|
| 1 coordinator | Yes | Yes |
| Any number of workers | Yes | Yes |
| Separate webhook nodes | Yes | Yes |
| Several coordinators (high availability) | No | Yes |
| Clustered scheduler | Not needed | Yes |
| Cache updates across nodes | Not needed | Yes |
| Shared sessions, no sticky sessions | No, memory only | Yes, Redis or PostgreSQL |
Community Edition already scales execution: one coordinator with as many workers and webhook nodes as you need. That covers growing volume.
Enterprise Edition adds what removes the last single point of failure: several coordinators that share the scheduler, the caches and the sessions. That covers uptime.
Running it
ByteChef ships docker-compose.cluster.yml, which covers every topology through variables:
export POSTGRES_PASSWORD=change-me
export RABBITMQ_PASSWORD=change-me-too
export BYTECHEF_ENCRYPTION_KEY=$(openssl rand -base64 16)
export BYTECHEF_SECURITY_REMEMBER_ME_KEY=$(openssl rand -base64 24)
# CE: 1 coordinator (also serving webhooks), 3 workers, RabbitMQ
docker compose -f docker-compose.cluster.yml up -d
# CE with 2 separate webhook nodes; the coordinator stays the fallback
BYTECHEF_WEBHOOKS=2 docker compose -f docker-compose.cluster.yml up -d
# EE high availability: 2 coordinators
BYTECHEF_EDITION=ee BYTECHEF_COORDINATORS=2 docker compose -f docker-compose.cluster.yml up -d
# Webhooks only on webhook nodes, no coordinator fallback
BYTECHEF_WEBHOOKS=2 BYTECHEF_COORDINATOR_WEBHOOKS=false docker compose -f docker-compose.cluster.yml up -dThe file holds no secrets: Docker Compose stops with a message if one of these variables is missing.
Set BYTECHEF_MESSAGE_BROKER_PROVIDER=redis to use Redis instead of RabbitMQ, BYTECHEF_SESSION_STORE=jdbc to keep sessions in PostgreSQL, and BYTECHEF_TENANT_MODE=multi for multi-tenant mode (EE).
Proven under failure
A cluster is only as good as its behavior on a bad day, so we ran one and tried to break it. Six runs covered the combinations that matter:
| Run | Edition | Coordinators | Webhook nodes | Broker | Sessions | Tenancy |
|---|---|---|---|---|---|---|
| 1 | CE | 1 | 2 | RabbitMQ | memory | single |
| 2 | CE | 1 | 0 | Redis | memory | single |
| 3 | EE | 2 | 2 | RabbitMQ | Redis | single |
| 4 | EE | 2 | 2 | RabbitMQ | Redis | multi |
| 5 | EE | 2 | 0 | Redis | Redis | single |
| 6 | EE | 2 | 0 | Redis | PostgreSQL | multi |
Each run spread parallel jobs across three workers, called a synchronous webhook, and watched a schedule that fires every minute. The EE runs also edited a workflow on one coordinator and stopped a coordinator under traffic.
What held in every run:
- Every job completed, and tasks ran only on workers.
- Webhook traffic landed on the webhook nodes. When we stopped them, the coordinator answered every call.
- The schedule fired exactly once per minute, in every run and every tenant, including while a coordinator was down.
- A workflow edited on one coordinator was served by the other immediately, and never leaked into another tenant.
- Stopping a coordinator under traffic logged nobody out. A killed coordinator was back within about 15 seconds.
The test also found three issues: a freshly started coordinator could hang on its first Redis session, failover through nginx took up to 22 seconds, and the Redis broker flooded the log on shutdown.
We fixed all three and ran those scenarios again. Cold coordinators answered in under half a second, failover took at most 2 seconds with every request succeeding, and shutdown was clean.
Before you take it to production
- Treat tasks as at-least-once. If a worker dies mid-task, the task goes back on the queue and runs again. Make steps that call external systems safe to repeat.
- Keep the encryption key safe and stable. Every stored connection depends on it.
- Put file storage on something every node can reach.
- Size workers by
bytechef.worker.task.subscriptions.default, the number of tasks each one runs at a time. - Scale each role for its own reason: coordinators for UI and API availability, workers for execution capacity, webhook nodes for incoming events.
- Make the infrastructure highly available too. PostgreSQL, the broker and nginx are single containers in the compose file. In production, use managed or clustered services.
The details of every variable are in the node roles documentation.


