views:

21

answers:

1

To make my extranet web application even faster/more scalable I think of using some of the caching mechanisms. For some of the pages we'll use HTML caching, please ignore that technique for this question.

E.g.: at some point in time 2500 managers will simultaneously login on our application
(most of them with the same Account/Project)

I think of storing an Account-cachekey and Project-cachekey into the user's Session and use that to get the item from the Cache.

I could have simply stored the Account into the session, but that would result in 2500 of the same Accounts in memory.

Is there a better solution to this or does it make sense :)?

+1  A: 

Generally adding items to session is seen as having a negative impact on scalability. Depending on your technology, you may have a problem scaling out to more than 1 server when using session variables (eg in classic asp).

Having said that, if performance is your top priority you could cache data in both session and application variables. I have always thought that its not worth the hassle for a dataset of this size becuase sql server will almost certainly have this data cached in memory and all you are saving is a network round trip.

Lastly, look at code and hardware optimisation first for performance enhancements. Migrating to managed/compiled code, reducing the size of your html, optimising your images, minifying JavaScript, and of course the html caching you mentioned previously - these are all things I would consider first.

James Westgate