FAQ

Page Discussion History

HttpUpstreamJdomainModule

Revision as of 03:34, 16 January 2014 by Wdaike (Talk | contribs)

Contents

ngx_upstream_jdomain

This module is a load-balancer, which resolve upstream domain name asynchronously. It will choose one ip from its buffer according to round-robin for each request.Its buffer has the latest IPs of the backend domain name. Each interval 1s, It will asynchronously resolve domain name.If resolve fails, the buffer retains the last successfully resolved IPs.

Example

http {
        resolver 8.8.8.8;
	resolver_timeout 10s;
 
        upstream backend {
                jdomain  www.baidu.com;
	}
	server {
		listen       8080;   
 
		location / {
			proxy_pass http://backend;
		}       
        }
}

jdomain

Syntax jdomain domain-name [port=number] [interval=number] [max_ips=number] [retry_off]

Context upstream

port=number -- backend's listening port. default is 80.

interval=number -- how many seconds to resolve domain name。default 1.

max_ips=number -- ip buffer size。default is 20.

retry_off -- if one ip fail, do not try next.

Installtion

Download the module.

 --add-module=<path>

Authors

Questions/patches to wdaike<unixant@gmail.com>, Baidu Inc.