You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew R Feller <af...@lsu.edu> on 2008/02/27 15:41:32 UTC

Storing sessions to disk like Apache HTTP server

Is there any way to store sessions to disk like Apache HTTP server?  If
it isn't possible, is there any reason why this would never make its way
into Tomcat?  I noticed there is a PersistentManager available with
Tomcat, however it appears experimental and only swaps idle sessions to
disk.

 

Thanks,

 

Andrew R Feller, Analyst

University Information Systems

200 Fred Frey Building

Louisiana State University <http://www.lsu.edu/> 

Baton Rouge, LA, 70803

(225) 578-3737 (Office)

(225) 578-6400 (Fax)

 


Re: CVS check-out

Posted by Michael Beardsley <mb...@comcast.net>.
There's no facility in CVS that I'm aware of to do this. You're best bet
would be to do a cvs export and then remove the files yourself. If
you're on a *NIX box, you can use the find command to do this. Something
like:

find /path/to/cvs/export -type f -exec rm -{} \;

Read the man pages for find. I'm not responsible for you deleting stuff
you don't want to.

I don't know how you'd do a one-liner like this on a Windows box, but
I'm sure there's some sort of anagram -- or you could use Perl or
Python.

Remember, CVS doesn't version directories like Subversion does, so this
is basically a one-time deal. You're not going to be able to do a cvs
update to pull down new folders without also getting all the files and
having to remove them again. (If you're going to do that, use cvs
checkout rather than cvs export and be sure to use the -d switch to cvs
update to build new directories).

Hope that helps.

Mike

On Thu, 2008-03-06 at 08:18 -0500, David Smith wrote:
> I think you'll need post this question on a CVS list.  I've never really 
> had all that much success with CVS -- Subversion is MUCH better.
> 
> --David
> 
> Quodras, Naveen wrote:
> 
> > 
> >Hi David,   Would you have any suggestions on the below query ??
> >
> >
> >-----Original Message-----
> >From: Quodras, Naveen 
> >Sent: Thursday, March 06, 2008 1:57 AM
> >To: 'Tomcat Users List'
> >Subject: CVS check-out
> >
> >
> >Hi,
> >     Don't know if this would be the right place to ask this kinda
> >question.
> >     But would anybody out here know , How do I check-out only the
> >folder structure from CVS without checking-out the files that are within
> >those
> >     folders. (As I don't want my Disc to be cluttered with all those
> >files)
> >
> > 
> >Thanks,
> >Naveen
> >
> >---------------------------------------------------------------------
> >To start a new topic, e-mail: users@tomcat.apache.org
> >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: CVS check-out

Posted by David Smith <dn...@cornell.edu>.
I think you'll need post this question on a CVS list.  I've never really 
had all that much success with CVS -- Subversion is MUCH better.

--David

Quodras, Naveen wrote:

> 
>Hi David,   Would you have any suggestions on the below query ??
>
>
>-----Original Message-----
>From: Quodras, Naveen 
>Sent: Thursday, March 06, 2008 1:57 AM
>To: 'Tomcat Users List'
>Subject: CVS check-out
>
>
>Hi,
>     Don't know if this would be the right place to ask this kinda
>question.
>     But would anybody out here know , How do I check-out only the
>folder structure from CVS without checking-out the files that are within
>those
>     folders. (As I don't want my Disc to be cluttered with all those
>files)
>
> 
>Thanks,
>Naveen
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: CVS check-out

Posted by David kerber <dc...@verizon.net>.
I have no clue; I've never used CVS, ever!

D


Quodras, Naveen wrote:
>  
> Hi David,   Would you have any suggestions on the below query ??
>
>
> -----Original Message-----
> From: Quodras, Naveen 
> Sent: Thursday, March 06, 2008 1:57 AM
> To: 'Tomcat Users List'
> Subject: CVS check-out
>
>
> Hi,
>      Don't know if this would be the right place to ask this kinda
> question.
>      But would anybody out here know , How do I check-out only the
> folder structure from CVS without checking-out the files that are within
> those
>      folders. (As I don't want my Disc to be cluttered with all those
> files)
>
>  
> Thanks,
> Naveen
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: CVS check-out

Posted by "Quodras, Naveen" <Na...@gs.com>.
 
Hi David,   Would you have any suggestions on the below query ??


-----Original Message-----
From: Quodras, Naveen 
Sent: Thursday, March 06, 2008 1:57 AM
To: 'Tomcat Users List'
Subject: CVS check-out


Hi,
     Don't know if this would be the right place to ask this kinda
question.
     But would anybody out here know , How do I check-out only the
folder structure from CVS without checking-out the files that are within
those
     folders. (As I don't want my Disc to be cluttered with all those
files)

 
Thanks,
Naveen

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


CVS check-out

Posted by "Quodras, Naveen" <Na...@gs.com>.
Hi,
     Don't know if this would be the right place to ask this kinda
question.
     But would anybody out here know , How do I check-out only the
folder structure from CVS without checking-out the files that are within
those
     folders. (As I don't want my Disc to be cluttered with all those
files)

 
Thanks,
Naveen

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew R Feller [mailto:afelle1@lsu.edu] 
> Subject: RE: Storing sessions to disk like Apache HTTP server
> 
> The student registration application's load consists of
> thousands of students pounding at a handful of servers 
> constantly in hopes they can schedule their classes before
> they fill up.

Yes, I've watched my son do it at his school.  (We used to do that with
punched cards, 40 years ago.  My then-roommate wrote the first automated
class registration system at Georgia Tech around that time.  Response
time was measured in days :-)

> 1. Does Tomcat keep all session information strictly in 
> RAM or does it swap out to disk?

The standard session manager uses only the Java heap.  The persistent
manager sounds like it does what you want, but it's "considered
experimental" (and has been so for a long, long time).  I guess it's up
to you if you want to play with it.  The doc is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

> 2. What commonly used formulas are there to determine sufficient
> RAM based on load size?

There aren't any because the amount of heap used is very sensitive to
the specific applications deployed.  You'll need to measure it in a test
environment, scaling up the number of sessions to see the effect on the
heap.

> 3. Is it better to split large clusters into smaller ones with 
> a few nodes replicating to the other clusters?

No experience here.  Perhaps Filip has suggestions.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by Andrew R Feller <af...@lsu.edu>.
Thanks for the replies Chuck as always; I meant to say that sooner. =P
I am also sorry this reply is a week overdue, however I have been tied
up for a week.  Let me explain the situation a little more thoroughly
and see what your thoughts are then:

For several critical applications such as SSO and student registration,
we want them clustered over multiple servers behind a load balancer.
The SSO application's load consists of users logging in and ticket
processing.  The student registration application's load consists of
thousands of students pounding at a handful of servers constantly in
hopes they can schedule their classes before they fill up.  It is like
people watching an eBay auction and constantly refreshing the page to
see if they have the winning bid and upping it whenever they aren't.

If a server goes down, the load balancer will forward traffic to the
others such that no one will experience interruption of service.
Obviously, this requires the application servers to be clustered such
that their sessions are replicated with one another.


Given that our SSO solution is currently clustered among three machines:
 
1. Does Tomcat keep all session information strictly in RAM or does it
swap out to disk?  If it swaps out to disk, is there any way to
configure how much session information can be kept in RAM?

2. What commonly used formulas are there to determine sufficient RAM
based on load size?  I am currently reviewing logs from our peak
application usage as well as an average day to determine the number of
logins / second.

3. Is it better to split large clusters into smaller ones with a few
nodes replicating to the other clusters? (Example below with nodes
denoted by "O")

 SSO  CLUSTER
--------------
| CLUSTER  A |
|            |
|  O------O  |
|   \    /   |
|    O--O    |
|    |  |    |
|----|--|----|
|    |  |    |
|    O--O    |
|   /    \   |
|  O------O  |
|            |
| CLUSTER  B |
--------------


I posed my original question (Can Tomcat write session information to
disk or database like the Apache HTTP) because it seemed more scalable
as:

1. Our SAN has several terabytes worth of space so session information
can grow easily.

2. Reduces RAM bottleneck

3. Reduces network traffic to replicate session information


I would appreciate any thoughts and alternatives you have to offer!

Thanks,

Andrew R Feller, Analyst
University Information Systems
200 Fred Frey Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-3737 (Office)
(225) 578-6400 (Fax)


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Wednesday, February 27, 2008 2:17 PM
To: Tomcat Users List
Subject: RE: Storing sessions to disk like Apache HTTP server

> From: Andrew R Feller [mailto:afelle1@lsu.edu] 
> Subject: RE: Storing sessions to disk like Apache HTTP server
> 
> Actually, the system we are concerned about will have tens of 
> thousands of concurrent users.

Number of users != number of sessions, unless they all log in and stay
logged in concurrently (or you have a very high session timeout
setting).  Regardless, given the price of memory and the ready
availability of 64-bit platforms, there's no sense in over-engineering
this.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew R Feller [mailto:afelle1@lsu.edu] 
> Subject: RE: Storing sessions to disk like Apache HTTP server
> 
> Actually, the system we are concerned about will have tens of 
> thousands of concurrent users.

Number of users != number of sessions, unless they all log in and stay
logged in concurrently (or you have a very high session timeout
setting).  Regardless, given the price of memory and the ready
availability of 64-bit platforms, there's no sense in over-engineering
this.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by Andrew R Feller <af...@lsu.edu>.
Actually, the system we are concerned about will have tens of thousands
of concurrent users.  We are using a Java-based Single Sign On solution
to tie together our various applications.  Given that we have 30,000
students and another 5,000 - 7,000 faculty and staff, we can have a lot
of activity.

Andrew R Feller, Analyst
University Information Systems
200 Fred Frey Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-3737 (Office)
(225) 578-6400 (Fax)


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Wednesday, February 27, 2008 1:57 PM
To: Tomcat Users List
Subject: RE: Storing sessions to disk like Apache HTTP server

> From: Andrew R Feller [mailto:afelle1@lsu.edu] 
> Subject: RE: Storing sessions to disk like Apache HTTP server
> 
> Some coworkers had concern that Java applications had difficulties
> scaling due to session information kept within memory.

Do you really think you're going to have tens of thousands of concurrent
sessions?  Or is your application designed to load up each session with
megabytes of data?

Rather than add complexity to handle what is likely a non-issue, why not
take the simple and inexpensive route: run a 64-bit environment and add
memory as needed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew R Feller [mailto:afelle1@lsu.edu] 
> Subject: RE: Storing sessions to disk like Apache HTTP server
> 
> Some coworkers had concern that Java applications had difficulties
> scaling due to session information kept within memory.

Do you really think you're going to have tens of thousands of concurrent
sessions?  Or is your application designed to load up each session with
megabytes of data?

Rather than add complexity to handle what is likely a non-issue, why not
take the simple and inexpensive route: run a 64-bit environment and add
memory as needed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Storing sessions to disk like Apache HTTP server

Posted by Andrew R Feller <af...@lsu.edu>.
Some coworkers had concern that Java applications had difficulties
scaling due to session information kept within memory.  This was spurned
on by an article from when Friendster rewrote their site from Java to
PHP. (http://www.oreillynet.com/onlamp/blog/2004/07/php_scales.html)

The thought was if Tomcat could store session information to disk, then
we could configure some of our Tomcat servers to work with one of our
large SANs rather than replicating the session.  It could even then be
worked into session replication to reduce the amount of traffic needed
to replicate session information.

Andrew R Feller, Analyst
University Information Systems
200 Fred Frey Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-3737 (Office)
(225) 578-6400 (Fax)


-----Original Message-----
From: Stephen More [mailto:stephen.more@gmail.com] 
Sent: Wednesday, February 27, 2008 9:36 AM
To: Tomcat Users List
Subject: Re: Storing sessions to disk like Apache HTTP server

On Wed, Feb 27, 2008 at 9:41 AM, Andrew R Feller <afe.....u> wrote:
> Is there any way to store sessions to disk like Apache HTTP server?

Can I ask why do you want to ?

-Steve More

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Storing sessions to disk like Apache HTTP server

Posted by Stephen More <st...@gmail.com>.
On Wed, Feb 27, 2008 at 9:41 AM, Andrew R Feller <afe.....u> wrote:
> Is there any way to store sessions to disk like Apache HTTP server?

Can I ask why do you want to ?

-Steve More

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org