In message <cb0e33bc.1a17a%[email protected]>, "Hettwer, Marian" writes:
>Does varnish cache DNS entries forever and does the dns lookup only once >at startup time? > >If so, why would it do that? Varnish does the DNS lookup at VCL compiler time. This is to avoid DNS-server trouble impacting varnish doing its job. We have talked about having the health-probe do DNS lookups in the background, but there are some interesting cornercases that needs to be dealt with, for instance: What happens when we suddenly get two IP#'s back, or when we get no ip numbers back. The advantage to doing the DNS lookup and error checking at VCL compile time, is that we have a CLI connection to report trouble on. >The initial DNS answer would include a TTL, indicating how long the record >is valid. Yes, and no standardized API returns that TTL to the application program, so all you can do is call getaddrinfo() periodically, at whatever frequency you deem appropriate :-( -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [email protected] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
