Skip to Content
Fusee Docs
Deployment and operations

Running it

The same workflow code runs in five arrangements. Start with the first and move when you need what the next one gives.

Where the journal livesCode runs inWhen
Embeddeda directory on the app's diskthe appone process, or one per directory
Serverfusee server's diskthe app (workers)several processes, one store
Replicatedthree or five serversthe app (workers)surviving a lost machine
Invokeda serverfunctions it calls (Lambda, Cloud Run, Vercel)nothing running while runs sleep
Kubernetesa StatefulSet of serversthe app's podsthe above, managed

Embedded

const engine = await Engine.open({ dir: "./data", workflows: [checkout] });

The engine is a library: no server, no network. A run's records go to the directory's log with one flush per batch; a crash loses nothing that was acknowledged. One process opens a directory at a time (a second one is told which process holds it). Use durability modes to choose the flush (fsync, fullfsync on macOS) and memory for tests.

Server

fusee server --dir /var/lib/fusee --listen 0.0.0.0:7600 --token-file /etc/fusee/token --http 0.0.0.0:7601
const engine = await Engine.open({ durability: "server", address: "fusee.internal:7600?token-file=/etc/fusee/token", workflows: [checkout] });

Workers lease shards from the server and run their runs; when a worker dies its shards go to another. Clients (Client.connect, the CLI, the HTTP API) reach any run through the server. Tokens and scopes: deploying. Details: server mode.

Replicated

Three or five servers, each with its own disk, agree on every record before it is acknowledged; a majority must be up. Workers connect to the group as to one server and follow its primary. Replication covers setup, membership changes and what is measured.

Invoked

The server calls an HTTP endpoint when a shard has work and no worker: the function opens an engine for that shard, runs it until idle, and returns. Nothing runs while workflows sleep for a week.

fusee server --dir /var/lib/fusee --listen 0.0.0.0:7600 --token-file /etc/fusee/token \
  --invoke https://worker.example.com/invoke --invoke-secret-file /etc/fusee/invoke-secret

Each SDK has a handler that verifies the request and runs the shard (server mode, invoked workers).

Kubernetes

helm install fusee deploy/helm/fusee --set members=3 runs a replicated group as a StatefulSet with its token in a Secret; deploy/terraform does the same through Terraform, deploy/systemd runs one server on a host, and deploy/monitoring has alert rules and a dashboard over /metrics. See deploying.

Watching it

/metrics (Prometheus), the UI on the --http address, fusee runs ls --status stuck, and the operations page: disk checks, backups, upgrades, traces.

On this page