Thomas Nyberg
January 30, 2016 11:32AM
Hello I've set up an http proxy to a couple of other servers and am
using max_fails and fail_time in addition to having a proxy_read_timeout
to force failover in case of a read timeout. It seems to work fine, but
I have two questions.

1) I'm not totally understanding the logic. I can tell that if the
timeout hits the max number of times, it must sit out for the rest of
the fail_timeout time and then it seems to start working again at the
end of the time. But it also seems like it only needs to fail once (i.e.
not a full set of max_fails) to be removed from consideration again. But
then it seems like it doesn't fail again for a long time, it needs to
fail max_fails times again. How does this logic work exactly?

2) Is the fact that an upstream server is taken down (in this temporary
fashion) logged somewhere? I.e. some file where it just says "server hit
max fails" or something?

3) Extending 2), is there any way to "hook" into that server failure?
I.e. if the server fails, is there a way with nginx to execute some sort
of a program (either internal or external)?

Thanks for any help! I've been reading the documentation, but I get lost
at times so if it's written there and I'm just being an idiot, please
tell me to RTFM (with a link if possible please :) ).

Also I forgot to mention, I'm using the community version on Linux mint:

$ nginx -v
nginx version: nginx/1.4.6 (Ubuntu)

$ uname -a
Linux mint-carbon 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8
09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Cheers,
Thomas

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upstream max_fails/fail_timeout logic?

Thomas Nyberg January 30, 2016 11:32AM

Re: upstream max_fails/fail_timeout logic?

Maxim Dounin February 01, 2016 09:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 248
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