Slide 7
Slide 7 text
原因
✓ NginxのDNSのcacheの仕様によるものだった
✓ https://www.nginx.com/blog/dns-service-discovery-nginx-plus/
7
As NGINX starts up or reloads its configuration, it queries a DNS server to resolve backends.example.com. The DNS
server returns the list of three backends discussed above, and NGINX uses the default Round Robin algorithm to
load balance requests among them. NGINX chooses the DNS server from the OS configuration file /etc/resolv.conf.
This method is the least flexible way to do service discovery and has the following additional drawbacks:
• If the domain name can’t be resolved, NGINX fails to start or reload its configuration.
• NGINX caches the DNS records until the next restart or configuration reload, ignoring the records’ TTL values.
• We can’t specify another load-balancing algorithm, nor can we configure passive health checks or other
features defined by parameters to the server directive, which we’ll describe in the next section.