﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1220	Unable to config NGINX to re‑resolves a domain name for UDP / TCP	jmcewan127@…		"
According the docs, https://www.nginx.com/blog/dns-service-discovery-nginx-plus/ this is possible in the open source version.

The example is for the http block,

''resolver 10.0.0.2 valid=10s;
server {
    location / {
        set $backend_servers backends.example.com;
        proxy_pass http://$backend_servers:8080;
    }
}''


And according to the note following: 

""Note: For TCP/UDP load balancing, this method of using a variable in the proxy_pass directive is supported in NGINX 1.11.3 and later, and NGINX Plus R10 and later.""

But clearly not, as in 1.11.10 using '''set''' is not possible in a top level stream block. For example:

''resolver 10.0.0.2 valid=10s;
server {
        set $backend_servers backends.example.com;
        listen 12345 udp;
        proxy_pass $backend_servers:12345;
}''

'''set''' will error as  [emerg] ""set"" directive is not allowed here in /etc/nginx/nginx.conf:15


So either the document is wrong, or there's a bug where set should be supported but isn't.

Either way need to be able have the DNS re-resolve for TCP/UDP forwarding [given the dynamic nature of the destination IP].









"	defect	closed	major		nginx-core	1.11.x	invalid		jmcewan@…	"Linux servename 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
"	"nginx version: nginx/1.11.10
"
