Skip to content

feat(swarm)!: support multi-node deployment - #301

Merged
dargmuesli merged 1 commit into
mainfrom
feat/swarm/multi-node
Sep 4, 2026
Merged

feat(swarm)!: support multi-node deployment#301
dargmuesli merged 1 commit into
mainfrom
feat/swarm/multi-node

Conversation

@dargmuesli

Copy link
Copy Markdown
Member

The stack currently runs on a single node, where nothing distinguishes services that can move from services that cannot. Adding a second node makes that distinction load-bearing, since Swarm is free to reschedule anything onto the new node on any update, drain, or reboot.

Two things tie a service to one machine. Named volumes use the local driver, so a rescheduled service finds an empty volume rather than its data, which for postgres means an empty database served to a live application. Bind mounts under configurations/ resolve to an absolute path on the node the stack was deployed from, and on any other node Docker silently creates an empty directory there, so the service starts misconfigured instead of failing.

Pins the 22 affected services to the node labelled vibetype.storage=true: the 19 holding a production volume, plus adminer, debezium-postgres-connector and redpanda-console, which hold only a configurations/ bind mount. The shared label also keeps the three sets that share a volume together: postgres with postgres-backup with jobber, traefik with traefik-certs-dumper, and the six zammad services.

Constraints live in the production deltas only. Development runs on a single unlabelled node, where the constraint would leave the service unschedulable.

Also declares the stack's overlay network explicitly in order to set its MTU to 1400. Hetzner Cloud's private networks run at 1450 rather than the 1500 the overlay driver assumes, and the VXLAN header takes another 50 bytes. Left at the default, health checks and small requests keep succeeding while large payloads stall.

docs/multi-node.md records which services are pinned and why, the rule for adding a service, and the node setup.

Deploying this needs the node label to exist first, and the MTU change needs --force, since Docker never updates an existing network's options.

BREAKING CHANGE: services holding a production volume or a `configurations/` bind mount now require a node labelled `vibetype.storage=true`; label the node before deploying, and deploy with `--force` so the overlay network is recreated at the new MTU.
@dargmuesli
dargmuesli merged commit b8ba0c5 into main Sep 4, 2026
8 checks passed
@dargmuesli
dargmuesli deleted the feat/swarm/multi-node branch September 4, 2026 10:02
@maevsi-bot

Copy link
Copy Markdown

🎉 This PR is included in version 21.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants