Outside SessionState Memory Management Procedure

We use state session state outside of the /ASP.Net process . We know that we had problems with this, because in the past it was abused, too often stored in a session state too often, so they were in the process of switching to a more scalable system.

In the meantime, we are trying to understand how the session state service manages this memory and what limitations we have. But none Microsoft docs seem to go into details.

In particular, I want to know:

  • What are the limits of how β€œstandard” of the proc session state (set with IIS in the Windows Management Console) can be stored? (64)
  • Is there a user restriction?

standard service, I mean this:

enter image description here

+5
source share
1 answer

There are no restrictions in comparison with the machine on which the service is located. If it has 16 gigabytes of RAM, it is assumed that for other processes / OS / etc. Several concerts are used, approximately 13 GB of memory will be available for the session data. Data is not saved to disk, so data always exists in RAM / memory; therefore, when you restart the service, all sessions disappeared. The memory is unstable and works like a RAM disk.

If you have reached the memory limits of the machine where your session state service is hosted, you either store too much data per user, or too many users that store small data. You are already on the right track, as the next step moves to the distributed session state provider for proper scaling. This is often achieved using a distributed caching system that comes with a session state provider or by writing your own provider against the specified system.

There are no data restrictions for each user, but note that serialization always occurs due to communication with the process. Therefore, there is a practical limit, because serializing / deserializing a concert of user data for each request will be very slow, no matter how you approach it.

+1
source

Source: https://habr.com/ru/post/1201338/


All Articles