Welcome! Log In Create A New Profile

Advanced

max_fails for 404s?

Steven Deobald
May 18, 2011 03:38PM
Hey folks,

We've got the following scenario occurring in production. The solution is
non-obvious... to me, at least.

[client] ==> [nginx] ==> [service S]

* nginx fronting 2 application servers which provide a service S. (Primary
and backup, both running Trinidad. Trinidad is a JRuby/Rails wrapper for
Tomcat.)
* hot-deploying a rails (jruby) app into Trinidad causes Trinidad to return
a 404 to nginx
* nginx returns the 404 to the application. In this particular case, the
client is another service which expects service S to remain live during
deployments

So, nginx does provide an "http_404" case for the "proxy_next_upstream"
directive. However, this would require the "max_fails" setting to pertain to
404s, which it doesn't... otherwise legitimate 404s produce an infinite
loop.

Is there something like "max_fails" for 404s?
Is there another solution to this problem?
Is it Trinidad's fault for returning 404s and not 503s? (I would say it is
but I can't find a solution to that problem just yet.)

Thanks!
-steven
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

max_fails for 404s?

Steven Deobald May 18, 2011 03:38PM

Re: max_fails for 404s?

Antoine Bonavita May 18, 2011 03:54PM

Re: max_fails for 404s?

Maxim Dounin May 18, 2011 04:02PM

Re: max_fails for 404s?

Steven Deobald May 18, 2011 05:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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