2

I'm facing problem when I tried to use redis as session server for the below configuration:

  1. more than one windows servers hosting same application with https://github.com/Azure/aspnet-redis-providers
  2. Elastic load balancer with weighted routing redirects requests to the all IIS servers
  3. Redis is hosted in AWS elastic-cache and accessible from both servers
  4. 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.

Raghavendra
  • 1,419
  • 4
  • 19
  • 28
vikky MCTS
  • 162
  • 1
  • 6
  • I had problems with my redis cache recently, it was coming up with a different error. What I did was I created a new node and repointed my site to the new one. This fixed it. I realise that this might not be too helpful in retaining your existing cache data but it's definitely worth a try in case what you have is a dodgy cache node. – Luke Jun 28 '16 at 12:48
  • In ASP.NET all request should hold lock to session before serving request. So in initial phase of request it gets write lock and then executes the page and then releases the lock. if server 1 has the lock then server 2 will wait until it get lock after server 1 releases it. If it is not happening like this then there is some issue. Can you please provide reproducible app? – Siddharth Chatrola Jul 05 '16 at 21:17

0 Answers0