how to flush director dns ttl

Gao Yongwei itxx00 at gmail.com
Wed May 8 09:41:54 CEST 2013


2013/5/8 Paul A. Procacci <pprocacci at datapipe.com>

> On Wed, May 08, 2013 at 12:44:48PM +0800, Gao Yongwei wrote:
> > Hello,lists:
> > I am using varnish in a CentOS6.4 box,bellow is version info:
> >
> > [root at cdn001 ~]# uname -r
> > 2.6.32-358.2.1.el6.x86_64
> > [root at cdn001 ~]# rpm -q varnish
> > varnish-3.0.3-3.el6.art.x86_64
> >
> > and in my /etc/varnish/default.vcl
> > I use ' dns director':
> >
> > director dnsdomain dns {
> >     .list = {
> >         .port = "80";
> >         "10.0.0.0"/24;
> >     }
> >     .ttl = 12h;
> > }
> > notice that the ttl has been set to 12h because I want to reduse dns
> > resolve time,there is a domain www.example.com which resolved to
> 10.0.0.2
> > ,after the dns changed www.example.com to 10.0.0.3, varnish cannot find
> the
> > real backend as the ttl  been set to 12h.so I must do a 'service varnish
> > reload' to update the director.
> >
> > Is there any other way to flush the director ttl without  a service
> reload
> > ?  thanks.
>
> I believe the answer is no.  Varnish checks the hostname at compile time,
> and doesn't recheck it until the ttl expires.
>
> ~Paul
>
See,when the ttl expires, varnish will flush the hostname ,so ,is there
anyway we can manually flush the ttl immediately ?
thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130508/0b776025/attachment-0001.html>


More information about the varnish-misc mailing list