One ByteChef container covers most teams. That changes once automations start running the business: invoices, order sync, customer onboarding, AI agents talking to customers. From then on, a restart, a traffic spike or a dead server can't be allowed to stop the work.

ByteChef can run as a cluster from the same Docker image you already use. Each node takes one or more roles, and each role scales on its own. Here's how it works and how we tested it.

Why run more than one node?

It isn't about raw speed. A cluster gives you guarantees a single process can't:

  • Scheduled runs fire exactly once. A nightly payroll export shouldn't be skipped because a server restarted, or run twice because two servers both thought it was their turn.
  • Execution scales without touching the UI. A batch of 10,000 records arrives, you add workers, and the people editing workflows never notice.
  • Public traffic is isolated. Webhooks from Stripe, Shopify or your own product can get dedicated nodes, so an event burst doesn't slow down the API or the editor.
  • Maintenance without downtime. With two coordinators you can restart or upgrade one while the other serves users, and nobody is logged out.
  • It's your infrastructure. Regulated teams keep data inside their own network, on Docker, Kubernetes or AWS, with the availability of a hosted service.

Three roles, one image

Every node runs the same application. Three variables decide what it does, and all three default to on:

Role Variable Responsibility
Coordinator BYTECHEF_COORDINATOR_ENABLED Serves the API and UI, coordinates jobs, runs the scheduler that fires triggers
Worker BYTECHEF_WORKER_ENABLED Executes tasks (component actions, scripts). Serves no API
Webhook node BYTECHEF_WEBHOOK_ENABLED Serves public webhook, callback, approval and resume endpoints

In short: coordinators decide what runs, workers run it, and webhook nodes take in events from outside.

Coordinators also serve webhook endpoints, so dedicated webhook nodes are optional. Add them when webhook traffic needs its own capacity or when you'd rather not expose public endpoints on the nodes serving your UI.

A message broker connects the nodes. 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 load-balances the coordinators and routes webhook paths to webhook nodes, falling back to coordinators.
  • Coordinators serve the UI and API and run the scheduler.
  • Workers execute tasks and sit outside the load balancer.
  • Webhook nodes are optional.
  • RabbitMQ or Redis carries every message between nodes.
  • PostgreSQL stores the data and the scheduler's job store.
  • migrate is a one-shot service that applies database migrations before any node starts.

What makes it a cluster, not a pile of containers

Starting several copies of an app is easy. Getting them to behave as one system is the hard part.

  • One scheduler decision per trigger. Coordinators share the scheduler's job store in PostgreSQL and take a row lock before firing, so each scheduled run starts on exactly one coordinator, even mid-restart.
  • Same secrets everywhere. Connections to your CRM, bank or email are stored encrypted with a shared key. A connection saved through one coordinator works on any worker.
  • Shared files. Workers write execution logs; whichever coordinator serves the UI reads them. All nodes use the same storage: a shared volume, NFS, EFS or S3.
  • Shared sessions (EE). Login state lives in Redis or PostgreSQL rather than in one node's memory. Any coordinator can serve any request, and losing one logs nobody out.
  • Fresh caches (EE). Nodes cache workflows and definitions in memory. Changes are announced over the broker, so no node serves a stale version.
  • One migration run. Migrations run once before nodes start, so twenty nodes booting together never race on the schema.

Community vs. Enterprise

Capability Community (CE) Enterprise (EE)
1 coordinator Yes Yes
Any number of workers Yes Yes
Separate webhook nodes Yes Yes
Multiple coordinators (HA) No Yes
Clustered scheduler Not needed Yes
Cross-node cache updates Not needed Yes
Shared sessions, no sticky sessions No, memory only Yes, Redis or PostgreSQL

Community Edition already scales execution: one coordinator plus as many workers and webhook nodes as you need. That handles growing volume.

Enterprise Edition removes the last single point of failure with multiple coordinators sharing the scheduler, caches and sessions. That handles 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 -d 

The file contains no secrets. If one of these variables is missing, Docker Compose stops and tells you.

Other switches: BYTECHEF_MESSAGE_BROKER_PROVIDER=redis swaps RabbitMQ for Redis, BYTECHEF_SESSION_STORE=jdbc keeps sessions in PostgreSQL, and BYTECHEF_TENANT_MODE=multi enables multi-tenant mode (EE).

We tried to break it

A cluster is only as good as its worst day, so we ran six configurations and threw failures at them:

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 firing every minute. EE runs also edited a workflow on one coordinator and killed a coordinator under load.

What held in every run:

  • Every job completed, and tasks ran only on workers.
  • Webhook traffic hit the webhook nodes; with those stopped, the coordinator answered every call.
  • The schedule fired exactly once per minute in every run and tenant, including while a coordinator was down.
  • A workflow edited on one coordinator was served by the other immediately and never leaked across tenants.
  • Killing a coordinator under traffic logged nobody out, and it was back in about 15 seconds.

The tests also surfaced three bugs: a fresh 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 reran those scenarios: cold coordinators now answer in under half a second, failover takes at most 2 seconds with zero failed requests, and shutdown is clean.

Production checklist

  • Treat tasks as at-least-once. If a worker dies mid-task, the task is requeued and runs again. Make steps that call external systems idempotent.
  • Keep the encryption key safe and stable. Every stored connection depends on it.
  • Use file storage every node can reach.
  • Size workers with bytechef.worker.task.subscriptions.default, the number of concurrent tasks per worker.
  • Scale each role for its own reason: coordinators for UI/API availability, workers for execution capacity, webhook nodes for incoming events.
  • Make the infrastructure HA too. PostgreSQL, the broker and nginx are single containers in the compose file; use managed or clustered services in production.

Every variable is documented in the node roles docs.

Originally published on the ByteChef blog. ByteChef is an open-source workflow automation and AI agent platform: github.com/bytechefhq/bytechef.