Nginx health checks

mike mike503 at gmail.com
Tue Jun 10 22:32:31 MSD 2008


On 6/10/08, Barry Abrahamson <barry at automattic.com> wrote:

> Another option would be to use another program such as keepalived to do the
> health checks and then modify the nginx config on the fly, but it seems less
> than ideal.

I've had this same desire and thought about doing this too...

Right now I've gone back to using ipvsadm/ldirectord/LVS on my
frontend "load balancer" server and then using nginx on my web/app
servers (3 of them) - that way ldirectord does the healthchecks and
removes them from the pool and I don't have to mess with nginx at all
tweaking timeouts/etc.

The one major bonus about nginx is if it determines one backend is
failed, it will try the next one. The problem is, I would be rebooting
one of my 3 backends for instance and I'd have thousands of log file
entries about it. I guess I could use some parameters to say once one
is dead, forget about it for 30 seconds or something. But adding a
little bit of load balancer healthcheck type intelligence could mean
even more nginx adoption as it would alleviate the need for
ldirectord, and you'd get the bonus of gzip, SSL and layer 7
capabilities on the frontend.





More information about the nginx mailing list