The session themselves will consume the server RAM if your mode is set to InProc
, which is limited only by the amount of RAM available to the worker process.
Considering your high demand, you want to be really careful what you're putting in the session, only when it's absolutely necessary. Don't put things in session and leave them there for use in a page or two, just go back to the database and get them, otherwise your session size will creep up drastically.
Based on what you're storing, it's only 5kb or even less, so based on 100k users, that would be:
5kb * 100,000 = 488.28MB
So you see, even though you're only storing a couple of details, at that level of usage the memory usage is quite significant.
For such high demand and usage, I would consider using a dedicated state server (StateServer
mode) which allows you to manage it separately and allocate the resources to that server as required.
The other option is using SQL Server session (SQLServer
mode) which is limited only by the size that is available to the database. So we're talking hard disk space here and not RAM. To be honest though, if you're going to the database to retrieve your session information, then why not just go to the database and retrieve the information you need anyway?