0

Recently to allow concurrent requests at some level and to increase the performance, we enabled EnableSessionState="Readonly" for one our .aspx page for read only access for session data.

I would like to know enabling this in web farm, will this effect any data loose or any other impact in server or user ?

Current Web Farm Settings:

Lets say We have 4 servers.

1. Lets say User A, requests for the page http://example.com/StudentDetails.aspx, this request hits Load Balancer.

2. Load Balancer based on traffic transfer the request to any 1 from 4 avialable servers.

3. Each server Has InProc Session State mode enabled.

4. We ensure that the same server handles subsequent requests from the same client.

Any help would be great.

Shaiju T
  • 6,201
  • 20
  • 104
  • 196
  • 1
    "We ensure that the same server handles subsequent requests from the same client"...what happens if that server becomes unavailable or overloaded during the session? Surely the whole point of load balancing is so you can seamlessly redirect any request to any of the currently available servers. – ADyson Jul 27 '18 at 09:53
  • @ADyson Yes we do the redirect , then that creates a new session in that server. – Shaiju T Jul 27 '18 at 09:56
  • Well it shouldn't, because you should be sharing session state across all the servers (e.g. using sql session state). Then you'll be much more resilient against individual server failures, and users won't lose their sessions (and potentially, their data) if one machine fails. – ADyson Jul 27 '18 at 09:59
  • @ADyson , yes that's correct , but my question is there any Impact of session state read only in a web farm ? – Shaiju T Jul 27 '18 at 10:05
  • 1
    what impact have you anticipated? You simply set it read only in one single page. If, as you mentioned, you aren't even sharing sessions between your servers, then effectively for session purposes you don't even have a farm. You just have 4 individual servers. There's no impact on the farm because there's no session sharing. If you _do_ start sharing sessions as I advised, then I still think the impact will be minimal if any at all. Read-only access should lead to less blocking (e.g. as might occur if the user is requesting two session-enabled pages concurrently) but that's all. – ADyson Jul 27 '18 at 10:19
  • @ADyson , thank you so much for the confirmation , that's the answer for me. – Shaiju T Jul 27 '18 at 10:32
  • hi, thanks. I have written it properly into the answer section in that case. – ADyson Jul 27 '18 at 10:59

1 Answers1

1

What impact have you anticipated?

You simply set it read only in one single page. If, as you mentioned, you aren't even sharing sessions between your servers, then effectively for session purposes you don't even have a farm. You just have 4 individual servers. There's no impact on the farm because there's no session sharing.

If you do start sharing sessions as I suggested in the comments, then I still think the impact will be minimal if any at all. Read-only access should lead to less blocking (e.g. as might occur if the user is requesting two session-enabled pages concurrently) but that's all.

ADyson
  • 57,178
  • 14
  • 51
  • 63