We have a Drupal application that uses sso to log users in.
We are using AWS classic load balancers (ELB), AWS is telling us that there is no session persistence on the ELB.
What I am trying to figure out is how cookies work with non persistence on the classic load balancers.
example.com DNS is pointed to the ELB. There are 2 servers in the pool Server1 and Server2
What we want to happen is if a user hits their home page on http://example.com/user/12345/
say on server 1 if they are not logged in already they are redirected to the sso page http://example.com/user/login/sso
, automatically log in and get a cookie SESS<hexnumber>
and then redirected back to http://example.com/user/12345/
We are not allowed to add any sessions server (redis) what is the guarantee that they will stay on server 1 for both of the redirects.
To my knowledge with every hit to 'example.com' the user could end up on either server 1 or server 2.
My Question:
If they get the cookie on server1 and then are redirected to server2 how will server2 know that a cookie is already assigned to that user on server1?
I seem to be thinking myself in circles. When working on this type of setup in the past using LBs without session persistence we used a redis server to hold the sessions and each request would look at the redis sever for the session information.