Sridhar Kumanduri wrote:
> My apologies for the earlier half-finished and jumbled up mail .. I
> have a question regarding how much Data can be in session ... Is there
> a limit generally or is it H/W and Servlet Container Dependent ... One
> of the form based application I am working on requires a lot of data
> to be put in session because it mimics the Model Windows concept ..
> For example , a screen might require a jump to another screen just to
> lookup some values and come back and continue processing .. In which
> case, I stores the current state of screen1 in session , then do the
> processing of screen2 (which might involve changing the data of
> screen1 in session) and get the state of screen1 back from session and
> continue processing.. If I have lots of users (about 500 to 1000)
> working on the system, am I in the danger of crashing the Server
> ?? Any thoughts would be appreciated .. Thanks and Regards Sridhar
> Kumanduri
There is *nothing* magic about a session -- think of it as a Hashtable
that the servlet container keeps for each user, during and in between
their requests.
Assuming that you have enough CPU, network, and database bandwidth, the
most likely impact of the environment you describe will be memory
occupancy. As long as you follow an equation like this:
N * M < H
where
N = # simultaneously logged on users (500-1000 per your notes)
M = average (or maximum, if you want to be conservative) memory
occupancy for session user data
H = available heap space (assuming you've already accounted for
the other needs of your app)
you'll be fine. For example, 1000 users at a megabyte apiece equals a
gigabyte of memory required for this purpose, which is certainly doable
if you have a large enough server. But only you can accurately estimate
the requirements for your own app.
I run an app that uses 768mb of heap space (on a 1gb main memory server)
and it runs just fine. We did it because we wanted to cache lots of
stuff to avoid later database access, instead of because we had this
many simultaneous users (yet), but it's just memory. Java seems to do
quite well handling heap space of that size.
Craig
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html