The getaddrinfo(3) API does not tell us the TTL value learned from DNS
so we have to add our own stuff for that. Without some kind of TTL, we would hit the DNS server once per failed attempt to connect to the backend. If the backend were down, we could hit it a LOT. In the VCL code: backend foobar { [...] set backend.dnsttl = 20s; } will assign a TTL for DNS lookups of this backends hostname+port combination, we will not hit the DNS server more often that this. The default is set at 30 seconds, short enough to make things are workable in a load-balancing-via-DNS setups, yet long enough to not pound the DNS server flat in case of backend failures. NOTE that as long as we succeed in connecting to the backend we do not perform new DNS lookups. That will have to be revisited along with possible load-balancing schemes for the backend(s). git-svn-id: http://www.varnish-cache.org/svn/trunk@1237 d4fa192b-c00b-0410-8231-f00ffab90ce4
Showing
Please register or sign in to comment