By default, nginx caches answers using the TTL value of a response. In a dynamic environment containers can get recreated with new IPs, reducing the validity of the cache allows refreshing these IPs https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver