Welcome! Log In Create A New Profile

Advanced

backup resolver possible?

August 21, 2012 02:03AM
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;
events
{
use epoll;
worker_connections 65535;
}

http
{
charset off;
override_charset off;
proxy_buffering off;
gzip off;
access_log off;
resolver ip1,ip2;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
server
{
listen 1002;
location /
{
proxy_set_header Host $host;
proxy_set_header Accept-Encoding "";
proxy_pass http://$http_host$request_uri;
}
}
}
Subject Author Posted

backup resolver possible?

medialy August 21, 2012 02:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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