https://serverfault.com/questions/1010342/nginx-using-resolver-in-a-stream
stream {
resolver 127.0.0.1 valid=1s;
# a hack to declare $server_us variable
map "" $server_us {
default server.foo.com:22222;
}
server {
listen 11111;
proxy_pass $server_us;
}
}