-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Leon,
Leon Rosenberg wrote: > On 3/7/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: >> Perhaps round-robin DNS? That's how I would do it, unless I wanted to >> buy a real load balancer like a BigIP. > > Ok, round-robin dns will work. > But it will probably work with pure tomcats too, wouldn't it? If you > round-robin the load between two httpds, why dont you do the same > between two tomcats? I suppose we're getting into a semi-philosophical discussion, here, about where load balancing "belongs". 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. 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. 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. Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). 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 - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7xwK9CaO5/Lv0PARAn4SAKCQyaWTBmiDrcGt0YxR5WL+C6TyJgCfcEUi DZ26oLSl/xT0oRBg6Y+rmDA= =x1/N -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]