Re: dnscache memory requirements for large number of server files
Ask Bjørn Hansen <[email protected]> Thu, 21 Oct 2010 21:19:47 -0700
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
--001636c5b814ed080704932cf3e0 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Sep 7, 2010 at 11:18 AM, Scott Gifford <[email protected]>wrote: > On Tue, Sep 7, 2010 at 12:44 PM, Lloyd Standish <[email protected]>wrote: > >> Hi Daryl and Jeff, >> Thanks for the information. I agree that a linear search would not be a >> good idea. Adding some sort of hashed lookup sounds like the way to go >> here. I'm not very experienced at C (my experience is primarily in perl and >> bash) and I have little time. > > > Going a bit off-topic for the list I know, but based on your comments > Lloyd, you may want to look at the Perl module Net::DNS::Nameserver: > > http://search.cpan.org/search?query=Net::DNS::Nameserver&mode=all > > > I have had fantastic luck using it to solve small, strange DNS problems > like the one you are describing. You could put an instance of dnscache in > front of it to handle the caching and get answers without going to the Perl > code, but really for these sorts of things Perl is pretty fast. > I know it's been a while, but for what it's worth the pool.ntp.org DNS servers are running a server based on Net::DNS::Nameserver. It's not super fast, but they - happily - do something like 30 million queries a day. Making a proxy of sorts that just sends back a fixed response for something on the blacklist and otherwise just forwards it to a real resolving server / cache should be pretty easy. --001636c5b814ed080704932cf3e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Sep 7, 2010 at 11:18 AM, Scott Gifford <span dir=3D"ltr"><<a hre= f=3D"mailto:[email protected]">[email protected]</a>></s= pan> wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote"= style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div class=3D"im">On Tue, Sep 7, 2010 at 12:44 PM, Lloyd Standish <span dir= =3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">lloyd= @crnatural.net</a>></span> wrote:<br></div><div class=3D"gmail_quote"><d= iv class=3D"im"> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Hi Daryl and Jeff,<br> Thanks for the information. =A0I agree that a linear search would not be a = good idea. =A0Adding some sort of hashed lookup sounds like the way to go h= ere. =A0I'm not very experienced at C (my experience is primarily in pe= rl and bash) and I have little time.</blockquote> <div><br></div></div><div>Going a bit off-topic for the list I know, but ba= sed on your comments Lloyd, you may want to look at the Perl module Net::DN= S::Nameserver:</div><div><br></div></div><blockquote style=3D"margin:0 0 0 = 40px;border:none;padding:0px"> <div class=3D"gmail_quote"><div><a href=3D"http://search.cpan.org/search?qu= ery=3DNet::DNS::Nameserver&mode=3Dall" target=3D"_blank">http://search.= cpan.org/search?query=3DNet::DNS::Nameserver&mode=3Dall</a></div></div>= </blockquote> <div class=3D"gmail_quote"> <div><br></div><div>I have had fantastic luck using it to solve small, stra= nge DNS problems like the one you are describing. =A0You could put an insta= nce of dnscache in front of it to handle the caching and get answers withou= t going to the Perl code, but really for these sorts of things Perl is pret= ty fast.</div> </div></blockquote><div>=A0</div><div>I know it's been a while, but for= what it's worth the <a href=3D"http://pool.ntp.org">pool.ntp.org</a> D= NS servers are running a server based on Net::DNS::Nameserver. =A0It's = not super fast, but they - happily - do something like 30 million queries a= day. =A0Making a proxy of sorts that just sends back a fixed response for = something on the blacklist and otherwise just forwards it to a real resolvi= ng server / cache should be pretty easy.</div> </div> --001636c5b814ed080704932cf3e0--