I was wondering if there is feasible way to have a node spit a specific
30x
error (i.e. 307) if it becomes unreachable, instead of passing to next
upstream node?
upstream mycluster {
server 192.168.1.2;
server 192.168.1.3;
server 192.168.1.4;
}
If node 192.168.1.3 is down, it should return a 307, instead of passing
to
192.168.1.4.
Just to clarify, my goal is to make sure a php-fpm POST is passed to
next
node, if current fails. From my understanding the 307 error is designed
to
do this. Thank you.
Thank you, Maxim. Related to second part of my question:
Will the POST be passed properly to next node, if first one fails? If is
not, is there a configuration setting that will enable that feature?
On Wed, Aug 15, 2012 at 05:12:43PM -0400, TECK wrote:
Thank you, Maxim. Related to second part of my question:
Will the POST be passed properly to next node, if first one fails? If is
not, is there a configuration setting that will enable that feature?
Once you return 307 redirect to a client - it’s up to a client to
decide what to do.
If you want nginx to pass requests to a next upstream server, just
leave proxy_next_upstream as set by default to “error timeout”.
It works for all request methods.