dns name for upstream

Valentin V. Bartenev vbart at nginx.com
Fri Mar 11 11:44:53 UTC 2016


On Thursday 10 March 2016 14:55:06 Frank Liu wrote:
> Hi,
> 
> I saw this example at serverfault.com:
> 
> server {
>     ...
>     resolver 127.0.0.1;
>     set $backend "http://dynamic.example.com:80";
>     proxy_pass $backend;
>     ...
> }
> 
> I have a few questions:
> 1) If the resolver DNS becomes unavailable (say connection timeout), what
> will nginx do? Will it keep using the old IPs or will it flush the DNS
> since TTL expires? If later, the proxy will stop working.
> 2) In the upstream block, I could define "keepalive #", but with this
> example, how can I do that?
> 3) This page
> http://nginx.org/en/docs/stream/ngx_stream_core_module.html#resolver says
> "This directive is available as part of our commercial subscription.". Is
> that still up to date? Can "resolver", "resolver_timeout" be used in free
> edition now?
> 

It's unclear about what module you are asking.  Note that the "set" and
"keepalive" directives are part of the "http" modules, while in 3-rd
question you're asking about the "resolver" directive in the "stream"
module.

There are also "resolver" and "resolver_timeout" directives in the
"http" module, and they are available in free edition:
http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver

  wbr, Valentin V. Bartenev



More information about the nginx mailing list