﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1081	ngx_stream_core_module proxy_pass dynamic resolve	Watson Yim		"Hi NGINX team,

Awesome work with the TCP reverse proxy! Keep it up!

I have a use case where my proxy_pass destination needs DNS re-resolving every day or so. I did some testing and was unable to setup destination re-resolving. My config is as follows:

/etc/nginx.conf
stream {
	resolver 10.0.0.2 valid=10s; 
	resolver_timeout 10s; 
	include /etc/nginx/stream.d/*.conf;
} 

/etc/nginx/stream.d/tcpbackend.conf is a symlink to /etc/nginx/stream.sites/tcpbackend.conf

/etc/nginx/stream.sites/tcpbackend.conf
server {
	listen 1883;

	proxy_pass internal-app.example.com:1883;
}

This setup works (as in tcp is successfully routed to the A host at internal-app.example.com, but when there is an A host change, nginx continues to route to the old IP.

This fix is readily available in the http module using ""set $be internal-app.example.com"" and then ""proxy_pass $be"". Is there such thing possible for the stream module?

Thanks!"	enhancement	closed	major		nginx-module	1.11.x	invalid	proxy_pass, ngx_stream_core_module, stream, tcp		Linux ip-10-0-1-98 4.4.11-23.53.amzn1.x86_64 #1 SMP Wed Jun 1 22:22:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.11.4
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) 
built with OpenSSL 1.0.1k-fips 8 Jan 2015
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --with-http_ssl_module --with-pcre --with-http_stub_status_module --with-http_realip_module --with-stream"
