Quick Note on Sessions
"Kossler, Paul S." <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Allo all, Berny is quite right about the scalability troubles surrounding HttpSessions, or session of anykind. Here is the basic problem "The user is slow, the machine is fast and memory realistate is expensive." This analogy works like this: A user has a large object in memory on the session, the user takes for ever (10seconds--10000ms) to do something with it. Ok this does not seem bad, now add 10,000 users/minute and you have a 5minute timeout on the session.... say a 50kB object in memory... 5*10kB*50k= 2.5GB of memory.(only 500MB of memory if you account for rolloff) In addition when one scales this in a clustered environment the session state must be mirrored to each cluster node so each node adds linearly to the session memory... so with 10 machines handling 1000users/minute each we wind up with the 2.5GB peak memory and 500MB avg memory on each machine in the 10 node cluster. There are several activities working on a solution to this problem. A solid one is JCache which is a distributable/clusterable Caching mechanism. Also look at the whitepapers of your HttpEngine to find out how it handles the session state problem. In the mean time JCache is what I use. Good luck all, Paul S. Kossler Sr.Software Engineer CACI Chesapeake <<Kossler, Paul S..vcf>>
Kossler, Paul S..vcf
(application/octet-stream, 384 B) - not displayed