Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Network Load balancing - session stickiness not consistent

We were using Application Load balancers earlier and session stickiness worked like a charm. Recently, we switched to the network load balancing and it's not working consistently, to make it worse we don't find any mention of session stickiness around network load balancers. We have the target groups as the backend application servers. Is network load balancer even an option for our use case?

like image 204
Mahesh H Viraktamath Avatar asked Sep 19 '25 20:09

Mahesh H Viraktamath


1 Answers

Sticky sessions are available for AWS Network Load Balancers. You simply set the switch on the target group properties. NLBs use IP addresses to control the stickiness. This means that if you have a lot of users with the same IP (behind a NAT for example) then they will all hit the same server. Note that stickiness is not available if you are using TLS termination on your NLB.

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#sticky-sessions

like image 65
Lee Jensen Avatar answered Sep 22 '25 21:09

Lee Jensen