Zohar,

Not exactly clear on your requirements. Do you care which backend server the
client is initially redirected to?

If not, then you can use a load balancer that supports "session affinity".
It will use a load-balancing algorithm to initially decide which back-end
server to forward a particular client to. Afterwards it will redirect all
requests from the same client to the same backend server - until the session
times out, which is configurable usually).

You can of course use a dedicated load-balancing appliance to do this.
Current versions of Tomcat also ship with a load-balancing application
application that might work for you. However a lot of people use the Apache
web server with its associated mod_jk module to perform this function. I
have used it a year and it works fine for this.

Here is the doc on the mod_jk connector:
http://tomcat.apache.org/connectors-doc/index.html

Here is the tomcat load balancer doc:
http://tomcat.apache.org/tomcat-5.5-doc/balancer-howto.html

You should also search the archives for this mailing list, there have been
many posts in the past on this topic:
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2
 

HTH - Richard



-----Original Message-----
From: Zohar Amir [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 6:03 AM
To: Tomcat Users List
Subject: distribution

Hello,
I've used tomcat to run some naive servlets, and now I need to do something
more complicated. I need to be able to distribute my service. Clients
connect to a tomcat server and their requests are forwarded to a backend
server. I need to be able to distribute all this, so that clients can
connect to any of a number of tomcat servers and then be "directed" to the
same backend server throughout their session (until they log out).
Can anyone point me to where I can read about such a solution?
What I thought was maintaining a database with a mapping of session ->
backend server, and use it, but this requires querying the database for each
transaction...
Any other ideas?]
Thanks,
Zohar. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to