Hi readers, I just came to share a short story (actually a fact) that I learned recently with you that might not be new to you! The Elastic Load balancer is one of the typical services of AWS that you usually have a case that needs it. It is the same here and we are using ALB (Application Load Balancer) and NLB (Network Load Balancer) in our services. But I noticed a fact about AWS NLB that changed my assumptions. NLB does pass through the TCP connections to the targets, so it is transparent!
If a target goes down, health checks for the target will fail and the target will be marked as unhealthy. NLB will stop routing traffic to that target and reroute traffic to remaining healthy targets.
The TCP sessions are terminated on the target(s) in a target group. The NLB selects a target (whichever is healthy) based on the load balancing algorithm and the selected target return responses to the client. Basically, the NLB is transparent to client requests! My assumption was that NLB terminates the session into itself and then creates a session to target! Something like offloading feature in TLS mode was expected.
Other relevant facts:
-
NLB is not a gateway! you can not convert attach UDP target to a TCP load balancer.
-
NLB doesn’t do failover at the session level. If you lose the target, the client will lose the established connection, so need to establish a new connection with the new target.
Hope this short blog, corrects the wrong assumption of someone :))