tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Loadbalancing in Tomcat 3.2 beta and mod_jk howto ?!?
Date Fri, 22 Sep 2000 06:20:51 GMT


Ok, thanks for all the info, we do have a Cisca local director infront of
the webservers, it was the software loadbalancing to the tomcats that was
our concern.

I greatly appreciate all info.

The reason for asking about the JDBC connection and login was because I
read the the tomcat load balancing would send same session with session
data to same tomcat instance, because else such things as password
identification will fail if the password request is sent from one tomcat
instance and the clients answer is sent to another tomcat instance ?

Might there be a bug or is this not iplemented yet ?

/Hans - Erik Skyttberg
Boxer TV Access AB
+46 (0)8 587 899 64
+46 (0)708 20 32 53

                    Gavigan"             To:          
                    <jack.gavigan        cc:                                          
          >             Subject:     RE: Loadbalancing in Tomcat 3.2 beta
and mod_jk howto ?!?    
                    respond to                                                           

> Thanks, forgot about adding them in server.xml.
> Now it works!

The invoice is in the post. ;)

> But not quite as expected since we have a admin tool built in
> jsp with jdbc connections to a oracle DB.

Not my area of expertise.

> Would also like some answer to this how will the loadbalancer
> work in a configuration like this:
> A   A
>   X
> T   T
> Here you have two servers running apache and two others running
> tomcat. You would like both apache to connect to same
> loadbalancer, do you setup loadbalancer on both tomcat or how
> would I ensure that users can connect even if one apache or one
> tomcat or even one apache and one tomcat goes down ?

1. Set up one or more workers on each of the Tomcat servers.
2. Configure a file to load-balance between the workers
on the Tomcat servers.
3. Use the same file on both Apache servers.

This should ensure that a Tomcat worker will still be available to
either/both Apache servers in the event of one of the Tomcat servers
ceasing to function.

The load-balancing/resilience between the Apache servers is not a
Tomcat-related issue and is therefore not suitable for this mailing list.
However, because I'm in a good mood - amongst the options available are a
DNS-based load-balancer, such as lbnamed ( or a hardware
solution such as Cisco's LocalDirector ( See the Apache URL
Rewriting Guide for some more background info (

Effectively, what you want to do is have:

            / \
           A   A
            \ /
            / \
           T   T

..where C represents your clients (i.e. people with web browsers), L is
your load-balancer, A is your Apache webservers and T is your Tomcat

This is a variant on the "CLAD" architecture, which stands for Client,
Loadbalancer, Application, Database. In fact, considering your new question
above, you're obviously also using a database, so adding

            \ /

  at the bottom of the diagram above would make this an example of CLAD,
with Apache+Tomcat representing the Application part of it.

Another tip: check out the rsync tool ( Makes keeping
those Apache and Tomcat servers in sync easier.

Jack Gavigan


This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

View raw message