Make network load balancer switch to healthy nodes faster

Hi all,

We use a network load balancer, and we noticed that when one node goes down,it takes almost 2 minutes to switch traffic to the remaining healthy one and this is something we don’t want. Is there any way to make this transition immediate (like a hardware load balancer is doing for example)?

Thanks!

30s interval - The approximate amount of time between health checks of an individual target

# 10s Timeout - The amount of time, in seconds, during which no response means a failed health check.
# 2 Unhealthy threshold - The number of consecutive health check failures required before considering a target unhealthy.
# 2 Healthy threshold - The number of consecutive health checks successes required before considering an unhealthy target healthy.

Lower your interval and timeout.

for some reason i cant get lower than these values on network load balancer :frowning:

Looking at those settings:

Every 30 seconds, waits for 10 seconds, needs to do twice = 80 total seconds before it will switch.

For an NLB you can select 10 sec for the interval. I think that would cut your time in half

Might need to dig into that more. According to the docs you should be able to adjust the interval down to 10s.

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html

The timeout appears to be fixed for HTTP (6s) and HTTPS (10s) health checks for an NLB.

Is the node going down because of an error or because of planned maintenance? If it’s planned, you can remove it first and wait for all the connections to drain before you start maintenance.

Any idea why you using n/w load balancer? Also when the unhealthy nodes goes down, are new instances coming up? How long does it take for new instances to startup?

Why don’t you try with two instances and see what’s happening and play around with settings.

Also what’s the min, max capacity settings?

We get a downtime of 3 seconds when switching load balancers. But we manage our own LBs, not using the provided service, because of exactly this problem with the quality.

You should be able to reduce to an interval of 10sec and a threshhold of 2, which gives a failover in the 20 to 30sec range.

Thank you all for the great insights, i managed to lower the numbers for network lb as much as possible (10+10x2 = we should be switching host in 40 seconds)

 # 10s interval - The approximate amount of time between health checks of an individual target
# 10s Timeout - The amount of time, in seconds, during which no response means a failed health check.
# 2 Unhealthy threshold - The number of consecutive health check failures required before considering a target unhealthy.