On 3/7/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Leon,
....
In my opinion, Tomcat is the resource that needs to be load-balanced,
since it's doing most of the work. You want to protect individual
servers from being crushed under the weight of too much traffic.
actually usually the resources behind tomcat doing the most work. In a
good scaling system you have a factor 1:5 or something... 1 DB -> 5
APP servers -> 25 tomcats... to give an example. But ok, its not
related to the example.
With no (formal) load balancer and just round-robin DNS, you do not
achieve your goal. By the luck of the draw, all your customers could get
a single server in your server bank. Or, by similar coincidence, only
"heavy" users might single out a particular server. This is not load
balancing: it's random request (or user, depending on DNS attitude of
the client) distribution.
Right, but this is something the tomcat could easily handle itself. By
a filter or a valve. Would mean one more request per client.
With Apache httpd out front, mod_jk can monitor the status of the
connected Tomcats and choose the "best" one for any given request.
Apache httpd is not doing too much work: mostly just copying data
between buffers. This does in fact load balance the two Tomcats. The
question was "what to do at this point?".
Well, if Apache httpd goes down, you're completely hosed. So, a solution
would be to setup another Apache httpd in parallel. This way, when one
Apache goes down, the other is available (though not necessarily
reachable when using round-robin DNS). The point is that you are not
100% down. Using round-robin DNS is not load balancing, but it will
increase the robustness of your deployment.
AFAICT, this robustness is not possible using Tomcats only. One needs to
have something like mod_jk working to load balance the app servers. I'd
be glad to hear that Tomcat can offload work to another server in a
cluster, but I have heard nothing about such a feature, so I assume that
it does not exist.
Maybe, but its not hard to implement, especially if you are
implementing it for one app knowing exactly the load on this app and
the use-cases.
Load balancing pretty much always comes down to either:
1. A single point of failure (Apache httpd, BigIP, or whatever).
Loadbalancers usually come in pairs :-)
or
2. Non-100% reachability (for instance, due to one of the
round-robin'd web servers going down).
It seems to me that the most robust deployment for a webapp is:
Random request distribution + Apache httpd + lb'd Tomcat
paired firewalls + paired loadbalancers + tomcat cluster.
Performs much better as the above :-) Try it out, give it a chance.
Leon
- -chris
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]