multiple resolver would retry others when someone fails
|Reported by:||Owned by:||Ruslan Ermilov|
|nginx -V:||nginx version: nginx/1.12.2 built by gcc 4.8.2 (GCC) built with OpenSSL 1.0.2h 3 May 2016 TLS SNI support enabled|
As mdounin mentioned, the resolver_timeout directive controls hard limit on the total DNS resolution time. If not answered, DNS queries are resent (to a different server if configured) each 5 seconds, see here:https://trac.nginx.org/nginx/browser/nginx/src/core/ngx_resolver.c#L197. There is no way to configure this timeout though, as this doesn't seem to be needed in most cases in practice.
To make sure DNS queries are resent to a different server if one the configured servers is down, consider using resolver_timeout set to something like 6s or more.
I set resolver_timeout to 10s, but when ngx_resolver_send_query fails, resolver do not retry, see here:https://trac.nginx.org/nginx/browser/nginx/src/core/ngx_resolver.c#L855, the code goto failed, return ERROR and clean events