Re: Basic load balancing
If you can afford it, go with hardware load balancing. it's easier to setup and configure. it's also more reliable and robust. of course, you have to open up your wallet and let the money fall out. if you really want sophisticated load balancing that allows you to schedule a server to go down, i would recomend Resonate. I've used them in the past and their product is solid. peter On 5/12/05, Will Hartung <[EMAIL PROTECTED]> wrote: > > From: "Harry Mantheakis" <[EMAIL PROTECTED]> > > Sent: Thursday, May 12, 2005 1:51 AM > > > What load balancing system would you recommend? (Is there some consensus, > > cost issues aside, as to what the best type of load balancing system is?) > > I wish I could say. > > We use a pair of redundant BigIP's from F5 (which are eleventy zillion > dollars), so, they're quite sophisticated. > > I know Cisco has some as well (which are probably eleventy and a half > zillion dollars). > > 3 common paths are to use Apache's mod_proxy, mod_jk, or the Tomcat balancer > app. > > I don't think any of them provide sticky sessions (though, obviously, the > Tomcat webapp could probably be reasonably modified to support that -- but I > don't know if anyone uses the Tomcat balancer in production). > > I don't think any of them let you easily bring down an individual server on > your own, though you might be able to reconfigure mod_proxy "on the fly" > with Apache and do a graceful restart after you've taken your "downed" > server out of the mix in the httpd.conf file. The children should finish > their requests normally and safely. > > The biggest problem with load balancing and such is that it opens up a HUGE > kettle of fish with regards to testing and such. > > For example, you'll get it all set up, type http://myhost/webapp/page.jsp > and it'll magically appear and then you'll go "Yea, but WHERE did it come > from"? > > We modified all of our JSPs, for example, to put the host of the server they > came from in an HTML comment. > > It really starts getting confusing. > > You should have a good set of web based tests for your application so that > you can be sure that it's still working the same when you add the new > servers. Then you can start testing things like yanking network cables from > your tomcat servers to see if failover happens (or not), and other effects, > and then decide if you're happy with it. You also can see if you perhaps > gained any capacity by splitting the tomcats (if you're app is DB bound, > then the bottleneck may be your DB server and the extra tomcat may not help > you at all, for example). > > But, either way, testing is the key here to make sure everything is working > as planned (and unplanned) since the new configuration is that much more > complicated than it was before. > > Regards, > > Will Hartung > ([EMAIL PROTECTED]) > > - > 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]
Re: Basic load balancing
> From: "Harry Mantheakis" <[EMAIL PROTECTED]> > Sent: Thursday, May 12, 2005 1:51 AM > What load balancing system would you recommend? (Is there some consensus, > cost issues aside, as to what the best type of load balancing system is?) I wish I could say. We use a pair of redundant BigIP's from F5 (which are eleventy zillion dollars), so, they're quite sophisticated. I know Cisco has some as well (which are probably eleventy and a half zillion dollars). 3 common paths are to use Apache's mod_proxy, mod_jk, or the Tomcat balancer app. I don't think any of them provide sticky sessions (though, obviously, the Tomcat webapp could probably be reasonably modified to support that -- but I don't know if anyone uses the Tomcat balancer in production). I don't think any of them let you easily bring down an individual server on your own, though you might be able to reconfigure mod_proxy "on the fly" with Apache and do a graceful restart after you've taken your "downed" server out of the mix in the httpd.conf file. The children should finish their requests normally and safely. The biggest problem with load balancing and such is that it opens up a HUGE kettle of fish with regards to testing and such. For example, you'll get it all set up, type http://myhost/webapp/page.jsp and it'll magically appear and then you'll go "Yea, but WHERE did it come from"? We modified all of our JSPs, for example, to put the host of the server they came from in an HTML comment. It really starts getting confusing. You should have a good set of web based tests for your application so that you can be sure that it's still working the same when you add the new servers. Then you can start testing things like yanking network cables from your tomcat servers to see if failover happens (or not), and other effects, and then decide if you're happy with it. You also can see if you perhaps gained any capacity by splitting the tomcats (if you're app is DB bound, then the bottleneck may be your DB server and the extra tomcat may not help you at all, for example). But, either way, testing is the key here to make sure everything is working as planned (and unplanned) since the new configuration is that much more complicated than it was before. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Basic load balancing
Thanks for the tip, we will look at it. -Mark -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 1:40 PM To: Tomcat Users List Subject: Re: Basic load balancing Joe Plautz wrote: > From what I understand load balancing is done at the router, where > clustering is a tomcat setup issue. > > Joe > > Faine, Mark wrote: > >> Tomcat 5.0.28 >> >> We seem to often have to make minor changes that cause us to have to >> restart our tomcat server (the whole server, not just a web >> application) and this has lead me to decide to research load >> balancing. The idea would be to have two servers that would be exact >> duplicates. One of the servers would only become available when the >> other was not running. This way we could make the change on server2 >> (and restart it) and then bring server1 down and make the change to >> it as well. This would prevent any real downtime for our users. >> Where should I look for info on how to implement this type of failover? >> Thanks for your help >> >> -Mark >> >> - >> 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] > > You can also use an Apache server as a front end to multiple servers/tomcats. I'm not talking about using mod_jk either, but using Apache as a traffic router. It works well, and you will be using mod_rewrite and/or mod_proxy. Check them out. Wade - 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]
Re: Basic load balancing
> Yeah, it's a mix of load balancing and clustering. > > > Regards, > > Will Hartung > ([EMAIL PROTECTED]) Thank you for posting that reply, Will. What load balancing system would you recommend? (Is there some consensus, cost issues aside, as to what the best type of load balancing system is?) Kind regards Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic load balancing
> From: "Faine, Mark" <[EMAIL PROTECTED]> > Sent: Wednesday, May 11, 2005 11:24 AM > Tomcat 5.0.28 > > We seem to often have to make minor changes that cause us to have to restart > our tomcat server (the whole server, not just a web application) and this > has lead me to decide to research load balancing. The idea would be to have > two servers that would be exact duplicates. One of the servers would only > become available when the other was not running. This way we could make the > change on server2 (and restart it) and then bring server1 down and make the > change to it as well. This would prevent any real downtime for our users. > Where should I look for info on how to implement this type of failover? > Thanks for your help Yeah, it's a mix of load balancing and clustering. The primary challenge you have to deal with is session replication so that when you fail your primary Tomcat, the stand by will have the same sessions in play. Once you have the sessions clustered, then it's a matter of redirecting traffic from the primary to secondary. This is what a load balancer system can do for you, in that it can help you cleanly switch over. What you need to do here is tell the load balancer to direct all new traffic to the secondary Tomcat, but still let any pending transactions go to your primary. Once the load balancer has shifted the traffic, you bounce the primary, let the primary add itself back in to your cluster and resynchronize the sessions, then you finally have the load balancer start shifting traffic back to the primary. Now, note that at some point during your switchover, you will be having both Tomcats live and working against the same DB or whatever your backend, so you need to make sure that it can handle that (if it's just a DB it's typically not a problem). Finally, once you've gone to all of this trouble, frankly, I'd just run both machines 100% and load balance between them, either round robin, or you can use session pinning (so that when a request comes in, their session sticks to a single machine barring machine failure). The reason I would do this is simply that I'm just philisophically opposed to having idle machines do nothing and waiting for something to happen. To me, an idle machine is simply a room heater. I don't need a $2000 room heater. In this case, since you need to have cluster aware sessions and replication anyway, and you have to have a load balancer fronting them anyway, why not simply double your performance (ideally) and run both machines if you're going to keep one idle anyway? You have to go through all the configuration headache anyway, so you may as well get some free performance out of it. It is my understanding that you can do most of this with 3 machines and stock Tomcat, as it already supports clustering, and there is a load-balancing application as well, but I don't know how good or featureful the load balancer is. Of course, you can do a function test on only a single machine with 3 interfaces as well. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic load balancing
Joe Plautz wrote: From what I understand load balancing is done at the router, where clustering is a tomcat setup issue. Joe Faine, Mark wrote: Tomcat 5.0.28 We seem to often have to make minor changes that cause us to have to restart our tomcat server (the whole server, not just a web application) and this has lead me to decide to research load balancing. The idea would be to have two servers that would be exact duplicates. One of the servers would only become available when the other was not running. This way we could make the change on server2 (and restart it) and then bring server1 down and make the change to it as well. This would prevent any real downtime for our users. Where should I look for info on how to implement this type of failover? Thanks for your help -Mark - 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] You can also use an Apache server as a front end to multiple servers/tomcats. I'm not talking about using mod_jk either, but using Apache as a traffic router. It works well, and you will be using mod_rewrite and/or mod_proxy. Check them out. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic load balancing
From what I understand load balancing is done at the router, where clustering is a tomcat setup issue. Joe Faine, Mark wrote: Tomcat 5.0.28 We seem to often have to make minor changes that cause us to have to restart our tomcat server (the whole server, not just a web application) and this has lead me to decide to research load balancing. The idea would be to have two servers that would be exact duplicates. One of the servers would only become available when the other was not running. This way we could make the change on server2 (and restart it) and then bring server1 down and make the change to it as well. This would prevent any real downtime for our users. Where should I look for info on how to implement this type of failover? Thanks for your help -Mark - 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]