Welcome! Log In Create A New Profile

Advanced

Re: Tomcat cluster behind nginx: avoiding delays while restarting tomcat

May 27, 2009 04:08AM
On Wed, May 27, 2009 at 12:59 AM, John Morris <jman@ablesky.com> wrote:

> When starting or restarting tomcat, our web application takes a couple of
> minutes to initialize, during which time the tomcat connector is listening
> on TCP 8080, but the application isn't ready to process requests.

This is one example of "healthchecks" that would make nginx more
robust for doing load balancing. I've got it on my wishlist :)

I think most people will say make a healthcheck script that updates an
nginx include config file with the list of upstreams and then HUP
nginx...

> - Write a script to edit nginx.conf, mark the tomcat node as 'down', and
> reload nginx;

I'd say make it an include. That way less stuff to go through :P (see above)

> - Or, write a script to run on the tomcat server using iptables to REJECT
> connections to TCP 8080 until the app is finished initializing.

This is an interesting approach, never thought about doing it on the
upstream itself. Kind of cool, actually. "Am I ready for requests?"
Subject Author Posted

Re: Tomcat cluster behind nginx: avoiding delays while restarting tomcat

mike May 27, 2009 04:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 217
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready