Missing SESSION structure on EC2 AWS Load Balancer Instances
-
Hi, I have a website which is hosted on EC2 AWS with Load Balancer ON and Sticky Session turned off but cross-zone transfer enabled. So my website is on 3 different server instances while the Database is single source of truth. So the Session Database table is shared across the different instances.
I am facing a very unusual error. When a user clicks on the button the website sends an AJAX request, which adds some data in the PHP SESSION structure. After the successful AJAX call returns the page is redirected to another page. Some times the AWS Load Balancer redirect the user to another AWS instance of the website. When the user lands on the redirected page the SESSION structure has some missing data. Which breaks the website user flow.
Why each instance has different SESSION ID even though it is part of the same user instance on the website. And why there is a missing SESSION structure when the AWS automatically switch the users between the 2 instances.
How can I fix this issue? Please advise and support regarding this matter. I will really appreciate any help.
Thank you,
- You must be logged in to reply to this topic.