High Availability & Multi-Server Clustering
Scale your application across multiple servers with rolling zero-downtime updates, cross-host load balancing, and private network routing.
Multi-Server Architecture
When deploying to multiple hosts, epd can either route traffic locally on each server or establish a distributed ingress mesh across all nodes.
DNS (Round Robin or Cloudflare)
┌──────────────┴──────────────┐
│ │
▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ Server 1 (Host A) │ │ Server 2 (Host B) │
│ Traefik Proxy │◄───────►│ Traefik Proxy │
│ Replicas (Slot G) │ Private │ Replicas (Slot G) │
└───────────────────┘ Network └───────────────────┘1. Cross-Host Routing (proxy.cross_host: true)
By default, Traefik on Server A balances requests only among containers running on Server A.
With proxy.cross_host: true:
- Each server's Traefik instance includes upstream replica targets across the entire cluster.
- If Server B experiences hardware failure or is undergoing maintenance, requests arriving at Server B's IP address can be transparently forwarded to healthy containers on Server A.
yaml
name: my-app
mode: docker
image: ghcr.io/my-org/my-app
proxy:
cross_host: true
# Bind internal service traffic to private VPC network IPs
private_ips:
203.0.113.10: 10.0.0.10
203.0.113.11: 10.0.0.11
203.0.113.12: 10.0.0.12
servers:
web:
hosts:
- 203.0.113.10
- 203.0.113.11
- 203.0.113.12
replicas: 2
port: 3000
domains: [app.example.com]2. Deployment Strategies: Rolling vs. Parallel
When deploying updates to a multi-server cluster, epd controls the rollout strategy:
Rolling Deployment (Default)
yaml
strategy: rollingIn a rolling deployment:
epddeploys to Host 1 and waits until health probes pass.- Once Host 1 is live and serving new traffic, it moves to Host 2.
- This sequence repeats until the entire fleet is updated.
- If a failure occurs on Host 2, Host 1 is already healthy, and the deployment stops safely before breaking the remaining hosts.
Parallel Deployment
yaml
strategy: parallelDeploys to all configured hosts concurrently. Recommended for staging environments or non-critical worker clusters where deploy speed is prioritized.
Next Steps
- Set up Automated Multi-Provider DNS Synchronization
- Configure Advanced Routing Rules
- Check out the Complete Configuration Schema