DEV Community

Hermit
Hermit

Posted on

AWS elb sticky session over IP

Hi all,

I am facing a challenge in configuring sticky session on AWS ELB. The problem statement which I have is, I want sticky session over IP and not over application. What I mean by that is, if a request is coming from same IP of a particular user , like even though browser tab/window change, the sticky session should work.

In my application (which runs on say https://app.in), the authentication method uses third party app (which runs on say, https://auth.in). So when the login page loads, the session gets created at the server (say box1 - one of EC2 boxes). The user clicks on login button and a new window pops up (with domain https://auth.in). The user now has to enter credentials details in https://auth.in and the verification request should go to box1 only (backend for auth and app both are running on all the boxes). But what is happening is, as soon I setup ELB, the session gets created at box1 but the verification request goes to Box2. Due to which the user never gets verified.

Can this scenario be solved using sticky session?

TIA.

Top comments (0)