Why does the Hetzner LB go red or requests stall when one node goes down?
When a node goes down, the Hetzner Load Balancer health check has to fail before the load balancer stops sending traffic to that node. Until then, new requests that land on that node stall. After that, the target shows as unhealthy (red) in the Hetzner Console and traffic goes to the remaining nodes.
Connections that were open through the failed node are lost. Clients with long-lived connections, such as WebSockets or gRPC streams, have to reconnect. A healthy node can also still forward a request to a pod on the failed node. This ends when Kubernetes marks the node NotReady and takes its pods out of the Service.
A red target does not always mean a failed node. With externalTrafficPolicy: Local, every node without a ready pod of the Service fails the health check and stays red. The load balancer then sends traffic only to the nodes that run your pods.
To shorten the window after a node failure:
- Set a shorter health check with annotations on the Service, for example
load-balancer.hetzner.cloud/health-check-interval: "3s". The value needs a time unit. - Use an HTTP health check on a readiness path instead of the default TCP check, so the check also fails when the application stops answering.
- Run at least two replicas on different nodes, so the remaining nodes can take the traffic.
See Tune health checks for node replacement for the annotations and values. In an update, Syself Autopilot drains a node before it replaces it, so your pods can finish open requests if they handle graceful shutdown. If the load balancer itself fails, see How do we make the cluster resilient to a Hetzner LB failure?
Related questions
