You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ch...@Elaxy.com on 2001/07/23 11:16:08 UTC

Load Balancing for WEB-Application with sessions

Hi,

For improving the performace, we are going to serve requests with many
computers. Here, a problem with redirection arises. As a rule, the requests
are randomly redirected to the existent servers, and it functions well for
undependent pages and servlets. We have to ensure that a hole session is
processed on (redirected to) the same server. Are there possibilities to do
it in Tomcat, or we have to write a redirector-servlet ourselves, to
control the redirections according to the session.

Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  christian.schildt@elaxy.com
________________________________________________
ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com
________________________________________________



RE: Load Balancing for WEB-Application with sessions

Posted by Paul Nock <pn...@medicineplanet.com>.
jk_mount/loadbalancing works well for this kind of thing.  We use it
loadbalancing across multiple servers, with multiple JVMs on each server.

The only issue we had was in the way our (Foundry) loadbalancer handled
things:

We needed session state preserved by cookie or sessionid, and it proved
'difficult' to make the loadbalancer work in this way with the default
tomcat session state stuff, ie.
cookie name = JSESSIONID
or
http://blah.com/blah/blah;jsessionid=BBBBBB.ident

Problem is the loadbalancer pattern matching used to preserve sessions by
URL couldn't do matching for cases like:
http://blah.com/blah/blah;jsessionid=*.worker
where the pattern to be matched is the ;jsessionid=*.worker

Cookie matching wasn't much better either, so we resorted to adding an extra
cookie in our application that was purely for use by the loadbalancer to
send the request to the right machine.

What we resorted to was rebuilding tomcat changing the name of 'jsessionid'
to something that identified the node so the loadbalancer knew where to send
it.

Works fine, if a bit messy due to hardware limitations.

Paul

-----Original Message-----
From: Christian.Schildt@Elaxy.com [mailto:Christian.Schildt@Elaxy.com]
Sent: Monday, July 23, 2001 2:16 AM
To: tomcat-user@jakarta.apache.org
Subject: Load Balancing for WEB-Application with sessions


Hi,

For improving the performace, we are going to serve requests with many
computers. Here, a problem with redirection arises. As a rule, the requests
are randomly redirected to the existent servers, and it functions well for
undependent pages and servlets. We have to ensure that a hole session is
processed on (redirected to) the same server. Are there possibilities to do
it in Tomcat, or we have to write a redirector-servlet ourselves, to
control the redirections according to the session.

Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  christian.schildt@elaxy.com
________________________________________________
ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com
________________________________________________



RE: Load Balancing for WEB-Application with sessions

Posted by Wouter Boers <Wo...@MphasiS.com>.
I think that what you want is not part of tomcat nor will it be. What you
require is a load blancer (or a machine that acts as a load balancer but I
don't know of any open source initiative on this). The loadbalancer keeps
track of session data will forward each request from one and the same
browser (not ip address but browser) to the same machine untill the users
session expires. I have had good epiriences with the Radware WSD Pro, hard
to install an configure but once up, works like a charm. But it really
depend on your butget if you can spare some for a load balancer.

Wouter

-----Original Message-----
From: Christian.Schildt@Elaxy.com [mailto:Christian.Schildt@Elaxy.com]
Sent: 23 July 2001 11:16
To: tomcat-user@jakarta.apache.org
Subject: Load Balancing for WEB-Application with sessions


Hi,

For improving the performace, we are going to serve requests with many
computers. Here, a problem with redirection arises. As a rule, the requests
are randomly redirected to the existent servers, and it functions well for
undependent pages and servlets. We have to ensure that a hole session is
processed on (redirected to) the same server. Are there possibilities to do
it in Tomcat, or we have to write a redirector-servlet ourselves, to
control the redirections according to the session.

Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  christian.schildt@elaxy.com
________________________________________________
ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com
________________________________________________