Mahesh H Viraktamath
Mahesh H Viraktamath

Reputation: 894

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?

Upvotes: 4

Views: 17128

Answers (2)

Lee Jensen
Lee Jensen

Reputation: 2291

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

Upvotes: 16

user8892366
user8892366

Reputation:

I think, session stickiness won't be possible on a TCP level load balancer. The ELB use cookies to implement session stickiness, so it won't be possible on a TCP connection.

Upvotes: -4

Related Questions