backup resolver possible?

medialy nginx-forum at
Tue Aug 21 06:03:54 UTC 2012

version: nginx 1.2.0 on centos 5.5 64bit

Nginx works as a http proxy. There are two resolver: ip1 and ip2. 
When ip1 fails on some url, nginx gives 502 error, but ip2 works on the url.

Can multi-resolver be used as master-slave? nginx may try slave resolver
when master resolver fails.

worker_processes      1;
 error_log             /dev/null crit;
 worker_rlimit_nofile  65535;
   use epoll;
   worker_connections 65535;
   charset           off;
   override_charset  off;
   proxy_buffering   off;
   gzip              off;
   access_log        off;
   resolver          ip1,ip2;
   proxy_buffer_size 64k;
   proxy_buffers     4     64k;
     listen         1002;
     location /
       proxy_set_header    Host             $host;
       proxy_set_header    Accept-Encoding  "";
       proxy_pass          http://$http_host$request_uri;

Posted at Nginx Forum:,229938,229938#msg-229938

More information about the nginx mailing list