dns name for upstream

B.R. reallfqq-nginx at yahoo.fr
Fri Mar 11 09:47:00 UTC 2016


On Thu, Mar 10, 2016 at 11:55 PM, Frank Liu <gfrankliu at gmail.com> wrote:

> 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.
>

​I suppose you will get a 504 'Gateway Timeout'?
​


> 2) In the upstream block, I could define "keepalive #", but with this
> example, how can I do that?
>

​The keepalive directive is only valid in the upstream block and there does
not see​m to be any equivalent.
You could use an upstream name in your variable to dynamically choose an
upstream group in which everything is configured as you wish.

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?
>

​nginx Inc. seems to be very conservative about keeping the incentives to
their product as part of their business model. No movement on that side
since the dawn of times.
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160311/6ac67754/attachment.html>


More information about the nginx mailing list