feat(infra): add Traefik load balancer with active node health check for central cluster failover
Add ActiveNodeHealthCheck that returns 200 only on the Akka.NET cluster leader, enabling Traefik to route traffic to the active central node and automatically fail over when the leader changes. Also fixes AkkaClusterHealthCheck to resolve ActorSystem from AkkaHostedService (was always null via DI).
This commit is contained in:
@@ -123,6 +123,19 @@ services:
|
||||
- scadalink-net
|
||||
restart: unless-stopped
|
||||
|
||||
traefik:
|
||||
image: traefik:v3.4
|
||||
container_name: scadalink-traefik
|
||||
ports:
|
||||
- "9000:80" # Central load-balanced entrypoint
|
||||
- "8180:8080" # Traefik dashboard
|
||||
volumes:
|
||||
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
|
||||
- ./traefik/dynamic.yml:/etc/traefik/dynamic.yml:ro
|
||||
networks:
|
||||
- scadalink-net
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
scadalink-net:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user