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).
19 lines
378 B
YAML
19 lines
378 B
YAML
http:
|
|
routers:
|
|
central:
|
|
rule: "PathPrefix(`/`)"
|
|
service: central
|
|
entryPoints:
|
|
- web
|
|
|
|
services:
|
|
central:
|
|
loadBalancer:
|
|
healthCheck:
|
|
path: /health/active
|
|
interval: 5s
|
|
timeout: 3s
|
|
servers:
|
|
- url: "http://scadalink-central-a:5000"
|
|
- url: "http://scadalink-central-b:5000"
|