resolver does not re-resolve upstream servers after initial cache

Dave Nolan lists at ruby-forum.com
Wed Nov 7 20:40:49 UTC 2012


Using nginx 1.2.3-stable on Ubuntu 12.04 I have the following config:

    http {
      resolver 172.16.0.23 valid=300s;
      resolver_timeout 10s;

      upstream myupstream {
        server example.com;
      }

      server {
        listen 80 default_server;

        location / {
          proxy_pass http://myupstream$request_uri;
          proxy_pass_request_headers on;
          proxy_set_header Host $host;
        }
      }
    }

As I understand it, without the resolver config, nginx will resolve
example.com's IP once on load and cache it until it stops or fully
reloads the config.

With the resolver config above, nginx should re-resolve the IP every
5mins.

However, this is not happening: I can watch tcpdump -n udp port 53 but I
see no re-resolution taking place.

I'd love to know how to fix this. Any advice appreciated thanks!

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list