Adding proxy nodes
A PORTAVIUM deployment can serve the same configuration from more than one node. The
topology is horizontally scalable nodes with distinct public addresses and multiple
A/AAAA records — there is no shared VIP and no public load balancer in front.
The multi-node behaviour described here was measured on a packaged build in an isolated lab. Multi-node is not the default reference deployment: the Quickstart installs one node. Read Tested boundaries before you plan a multi-node rollout.
How a node joins
There is no "join" button. A node joins by starting the same controller image against the deployment's shared database, with its own identity and its own public addresses:
- The node starts, registers its identity and begins heartbeating.
- It reads the authoritative live revision from the database and verifies that it serves it.
- If an Apply is in flight, the node waits for the deployment-wide activation fence, re-reads the authoritative state and either applies the current target or skips a target that a newer operation superseded. A joining node never reverts an operator's Apply.
- An operator Apply fans out to every node; each node verifies its own attempt and the rollout reports a per-node result.
What a new node needs
- The same PostgreSQL database (or the same writer endpoint of a PostgreSQL cluster) reachable from the node. The database is the single source of desired state, revisions, sessions and certificates.
- Its own public IPv4 address, and its own IPv6 address if it serves IPv6. DNS
publishes one
A/AAAArecord per node for each name. - The same
secrets/cert-encryption.keyand the same certificate material. A node that cannot decrypt the stored certificate keys cannot serve HTTPS. - Its own management name or address for the WebUI, and the same restricted management path.
- A unique
NODE_NAME, and its ownPUBLIC_IPV4/PUBLIC_IPV6inconfig/controller.env. - Ports 80 and 443 published on its own addresses, and the internal container networks from the Compose file unchanged.
A session issued on one controller is valid on another: sessions live in the shared database. Revision history, jobs and audit are shared for the same reason.
What stays local to a node
- The verified document, live-state and last-known-good files under
data/caddy/. - Served certificates under
data/tls/certs/, and the management certificate. - The data-plane admin endpoint and the node's own verification listener (never published).
- Interface counters and traffic statistics for that node.
Tested boundaries
The multi-node behaviour was measured with two controller+Caddy nodes against a three-member PostgreSQL cluster behind a writer endpoint, in a disposable lab:
| Case | Result |
|---|---|
| A proxy node leaves and returns | Database quorum untouched; the apply targeted only the remaining node; the returning node joined the live revision |
| Loss of the database primary | Writer endpoint back in 39.8 s; both controllers reconnected; both sessions still valid |
| Loss of one standby | Writer answered throughout; member rejoined streaming in 108.6 s |
| Apply killed mid-flight | The surviving node verified its attempt; the abandoned attempt was re-claimed after the stale window; both nodes ended on the same revision |
| Total database outage | Both nodes kept serving their last verified routes and certificates over IPv4 and IPv6 |
| ACME issuance and activation | The challenge was served by both nodes over both families; the issued certificate was served by both |
Not measured in that campaign: scheduled renewal (it produces a new version through the same activation path), drain of a node, and any VIP or load-balancer topology. A node that never compiles during an ACME order window does not serve that challenge; the fan-out of the Apply that triggers issuance is what makes the window.
Database high availability
The data plane never depends on PostgreSQL or the controller to keep serving what it
already holds. The control plane does: without the database, no administrator can sign
in, save or apply. If the deployment needs database failover, run PostgreSQL as a
cluster with a writer endpoint and point DATABASE_URL at it. Node count and database
topology are independent decisions.