Hi, We are not observing a failover. Our index page served by our first app server (worker1) was returning a 500 http status code, whereas the same index page served by our second app server (worker2) was returning normally (http status = 200). Yet the 500 error page was getting all the way back to the client.
The docs say, "The redirect flag on worker1 tells the lb_worker to redirect the requests to worker2 only if worker1 is in error state. In other cases worker2 will not receive any requests, thus acting like a hot standby." But we are still seeing our second app server get an equal number of requests. So could you clarify how to set up so that both nodes get an equal number of requests, but if one returns an error code, all requests will go to the other? Thanks, - Dave Christopher Schultz-2 wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dave, > > On 2/23/2011 3:32 PM, laredotornado wrote: >> We're using 6.0.24, running on two servers. In our workers.properties >> file >> on the web server, we have ... >> >> ===========Begin workers.properties ============== >> worker.lbroute.balance_workers=worker1,worker2 >> >> worker.worker1.type=ajp13 >> worker.worker1.host=ip_addr1 >> worker.worker1.port=8000 >> worker.worker1.lbfactor=1 > > You might want to look into using worker templates: you can set all of > this stuff for a single template worker and inherit them in the > individual ones. Useful for a consistent configuration for all workers > in a lb cluster. > >> worker.worker1.redirect=worker2 > > This should failover to worker2 if worker1 suffers an error, even though > worker2 is set to disabled. The docs say as much: you can use this as a > hot standby. > > You might want to look at the ping_mode, "good", "bad" settings, too. > >> How can I configure my workers.properties file so that if the index page >> of >> our sites is throwing a 500 http status code, it will fail over to the >> other >> worker? > > If your index page is being served by Tomcat/worker1, then this > configuration should fail-over to worker2. Is that not what you are > observing? If not, then please tell us what you are observing. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk1lkCsACgkQ9CaO5/Lv0PADywCfewAFL3/W5C7EVSL91NFxbBfA > hNsAn34/DRp5KmNHJwb4P/b6co0bTRhq > =pmf7 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Choosing-the-right-worker-tp30998571p31004353.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org