3

I'm currently using session variables as a cache to cut down the calls to the database.

I'm wondering at about how many concurrent users does this stop working at? 1,000, 10,000 ....100,000??? Also will iis start flaking out at a certain load? And are there any alternatives?

I know it depends on how much data I'm storing per user, but I want to hear from other peoples experiences.

I do have it setup so that when the code tries to access a timed out session that it reloads from the database.

I'm currently using iis6 but I could easily use iis7 if it handles sessions better.

Edit: Yes I'm using application variables for non user specific data.

4

5 回答 5

2

If this is of any concern to you, use a State Server or the SQL Storage options for the session. For almost all applications it will not prove to be a problem though.

于 2009-01-16T03:44:05.640 回答
1

If you have more than 124,889 users, your server will begin to be unresponsive.

Edit: if your data does not change and can be re-used, try caching it in an application scoped variable, i.e. reference data.

于 2009-01-16T03:38:42.577 回答
1

You should probably be looking at Memcached if you're getting to this point.

于 2009-01-16T03:54:35.977 回答
0

It's very unlikely that session variable capacity will ever be the limiting resource for your server. Any particular reason you're asking?

于 2009-01-16T03:57:57.670 回答
0

How about using the Cache instead, it allows automatic cache invalidation.

Cache invalidation can be done both based on a timeout and due to it being "kicked out" due to ressources.

You can use the Cache on a per-user-basis by giving each item a user specific key.

于 2009-01-16T07:30:04.810 回答