Nginx proxy_pass DNS Cache // Chris' Blog
https://www.nadeau.tv/post/nginx-proxy_pass-dns-cache31.03.2017 · We use nginx to proxy to an Amazon S3 bucket to serve static content to customers. Yesterday, I noticed a high failure rate through the proxy but I couldn’t figure out why. After some debugging, I finally discovered that the IP address nginx was hitting was different from the one that DNS was returning. It turns out that nginx resolves hostnames only once on load, meaning …
#1064 (NGINX DNS CACHING problem.) – nginx
https://trac.nginx.org/nginx/ticket/1064server {. listen 443; proxy_pass up_prod_tcp_443; } }`. I would expect NGINX to cache the DNS based on the TTL of the load balancer, (AWS ELB's are 60s). Seems like anytime the AWS ELB Public IP changes I get upstream timed out (110: Connection timed out) while connecting to upstream This is due to NGINX trying to connect to an OLD DNS entry.