I'm facing problem when I tried to use redis as session server for the below configuration:
- more than one windows servers hosting same application with https://github.com/Azure/aspnet-redis-providers
- Elastic load balancer with weighted routing redirects requests to the all IIS servers
- Redis is hosted in AWS elastic-cache and accessible from both servers
Redis serves as a session server for 1 server at a time without any issue
for each session 3 keys are created
"{/_ktffpxxxxxxg2xixdnhe}_Write_Lock"
"{/_ktffpxxxxxxg2xixdnhe}_Data"
"{/_ktffpxxxxxxg2xixdnhe}_Internal"
Issue: When 1+ servers try to serve same user, by accessing session from redis at same instance, if server1 have placed _Write_Lock
then the server2 fails to read+update-timeout OR write the data and after that it cleared the key
--> result, the user's next request to any server fails to verify his/her session.
Am i the only one who gets this issue ?? Please help ...
Note: With session stickiness enabled in ELB the signout is not intermittent, however that restricts us to take out a server for upgradation without loosing all user sessions for that server.