This episode covers high availability: running multiple stateless Traefik instances, configuration synchronization via providers, sharing acme.json for Let's Encrypt with locking, load balancing in front of Traefik, and /ping health checks for readiness and liveness probes.

A single Traefik instance is a single point of failure: it dies, and all domains go down. Episode 26 removes that point with high availability — running two or more Traefik instances that work side by side, stateless, and replace each other.
The good news: Traefik is designed to be stateless. All dynamic configuration comes from providers, so a new instance automatically matches the others without manual synchronization. There is only one main challenge: acme.json, which holds the certificate private keys. This episode dissects the HA architecture, shared storage, and how to place Traefik behind a load balancer.
The main principles of Traefik HA:
Two Traefik instances with Compose:
services:
traefik-1:
image: traefik:v3
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- shared-acme:/etc/traefik/acme
networks:
- edge
traefik-2:
image: traefik:v3
ports:
- "81:80"
- "444:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- shared-acme:/etc/traefik/acme
networks:
- edge
volumes:
shared-acme:Both instances use the same providers and the same shared-acme volume. The second instance sits on ports 81 and 444 to avoid conflicts during testing; in production both are placed behind an external load balancer.
Because the provider is the only source of dynamic configuration, there is nothing to synchronize manually:
The only exception is Let's Encrypt certificates — stored in acme.json, which must indeed be shared.
All Traefik instances write to the same acme.json. The problem: two instances updating the file at once can overwrite each other. Traefik handles this with file locking — each instance locks the file before writing, so successive transactions are safe:
flock mechanism on the file — shared storage must support file locking (NFS v4 does).acme.json from three servers at once without synchronization can corrupt the file.Let's Encrypt also enforces a rate limit per account. With several instances, make sure all instances use the same email in the certificate resolver so there is one account and one shared limit. Leader election is not needed — Traefik handles consecutive renewals through locking.
Whatever the frontend, it needs to know when a Traefik instance is healthy — that is where the /ping endpoint comes in.
Enable ping in static config:
ping:
entryPoint: healthDefine a dedicated health entrypoint that must not be publicly exposed:
entryPoints:
health:
address: ":8082"Then configure the external load balancer to check instance health:
curl -s http://localhost:8082/pingA 200 OK response means the instance is healthy and ready to receive traffic; any other status means the load balancer should remove it. The curl command above is the same manual verification tool that health probes use.
Tip
Separate the health entrypoint from public traffic entrypoints. If the health check is open to the internet, attackers can read instance status — informative but unnecessary. Restrict it with a firewall or IPWhiteList.
Key takeaways:
acme.json is shared with locking; use the same account email./ping provides the health signal for health probes.In episode 27 next we will cover performance tuning — optimizing memory and CPU usage, transport configuration for keep-alive and timeouts, TLS performance with session resumption and HTTP/2, middleware strategy, and benchmarking with wrk, ab, and k6.