• Poul-Henning Kamp's avatar
    The getaddrinfo(3) API does not tell us the TTL value learned from DNS · 580eebe6
    Poul-Henning Kamp authored
    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/varnish-cache@1237 d4fa192b-c00b-0410-8231-f00ffab90ce4
    580eebe6
Name
Last commit
Last update
bin Loading commit data...
debian Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
man Loading commit data...
redhat Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
svn2cl.xsl Loading commit data...