Welcome! Log In Create A New Profile

Advanced

Mark upstream proxy inoperable based on response body or arbitrary http status?

August 08, 2012 03:37PM
Hi,

I just started playing with Nginx. My goal is to rate limit requests to a set of backend proxies, and it looks like I want to do this using the modules HttpUpstreamModule, HttpProxyModule, and HttpLimitReqModule modules.

I see that HttpUpstreamModule marks an upstream server as inoperable based on the setting of proxy_next_upstream. However, I need to be able to mark a server as inoperable given conditions that I don't appear to be able to set. Specifically, if I could examine the results of a server response and mark it inoperable, or operable, based on the contents, that'd be best. Another, possibly less complicated solution would be for me to mark a server inoperable if the http status in the response is 302, but I don't see a "http_302" for proxy_next_upstream.

It would also be great if the amount of time before re-checking a server marked as inoperable was configurable separate from HttpUpstreamModule's fail_timeout (so I could say something like, if a server fails once in 1 second mark it inoperable, but don't try to check it again for 3 hours).

Am I overlooking options to do what I want to do here?

Thanks!
Andy
Subject Author Posted

Mark upstream proxy inoperable based on response body or arbitrary http status?

vdavidoff August 08, 2012 03:37PM

Re: Mark upstream proxy inoperable based on response body or arbitrary http status?

vdavidoff August 08, 2012 09:20PM

Re: Mark upstream proxy inoperable based on response body or arbitrary http status?

vdavidoff August 08, 2012 11:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 83
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready