You are not logged in.

#1 2015-11-25 19:23:13

qyprg
Member
Registered: 2015-09-24
Posts: 13

[SOLVED] Can unbound dns server use persistent caching?

I'm using unbound and I notice that the queries that I make during a session are cached but the cache isn't permanently stored so that it doesn't have to look for the same website the next time I start my computer.

Can unbound permanently cache dns queries so that the lookup times are eliminated (kinda like what pdnsd claims to be)? If yes, how?

Last edited by qyprg (2015-11-25 21:46:01)

Offline

#2 2015-11-25 20:30:46

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Can unbound dns server use persistent caching?

No. And AFAICT, persistent caching isn't worth doing anyway.

Look at these really low Time-To-Live snippets:

$ dig google.com
google.com.		300	IN	A	2.127.237.162

$ dig microsoft.com
microsoft.com.		3600	IN	A	104.40.211.35

So that's a TTL of 10 minutes (300 seconds) for Google, and 1 hour for Microsoft. Why bother caching these to disk?

Offline

#3 2015-11-25 21:01:17

qyprg
Member
Registered: 2015-09-24
Posts: 13

Re: [SOLVED] Can unbound dns server use persistent caching?

brebs wrote:

Why bother caching these to disk?

Will the cache occupy significant space? When do you think that persistent caching would be useful?

Offline

#4 2015-11-25 21:37:38

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Can unbound dns server use persistent caching?

qyprg wrote:

Will the cache occupy significant space?

Nope. I think the point is that most of the entries are likely to be out-of-date and thus need to be looked up again anyway.

These DNS lookups are fast, and should be a tiny fraction of the Internet bandwidth used. So there's no pressing reason *not* to just look them up over the Internet again.

When do you think that persistent caching would be useful?

Maybe if we step back in time about 20 years to the days of dial-up modems wink

Wikipedia says it best:

pdnsd is designed to be highly adaptable to situations where net connectivity is slow, unreliable, unavailable, or highly dynamic

In these days of broadband Internet, pdnsd is solving the problem the wrong way - the correct way to guard against your ISP's nameserver being slow is to *not* rely on that one server - instead, use the Internet's root DNS servers, which is what Unbound does (recursively).

Offline

#5 2015-11-25 21:45:05

qyprg
Member
Registered: 2015-09-24
Posts: 13

Re: [SOLVED] Can unbound dns server use persistent caching?

brebs wrote:
qyprg wrote:

Will the cache occupy significant space?

Nope. I think the point is that most of the entries are likely to be out-of-date and thus need to be looked up again anyway.

These DNS lookups are fast, and should be a tiny fraction of the Internet bandwidth used. So there's no pressing reason *not* to just look them up over the Internet again.

Oh, I get it.

brebs wrote:
qyprg wrote:

When do you think that persistent caching would be useful?

Maybe if we step back in time about 20 years to the days of dial-up modems wink

Wikipedia says it best:

pdnsd is designed to be highly adaptable to situations where net connectivity is slow, unreliable, unavailable, or highly dynamic

In these days of broadband Internet, pdnsd is solving the problem the wrong way - the correct way to guard against your ISP's nameserver being slow is to *not* rely on that one server - instead, use the Internet's root DNS servers, which is what Unbound does (recursively).

I'm using a shitty internet connection with 4Mbps browsing speed and because I've never used persistent caching before, I thought maybe it would speed things up.

Thanks for the explanation.

Offline

#6 2015-11-26 11:06:20

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Can unbound dns server use persistent caching?

Don't forget that some browsers also cache dns and can do some prefetch in advance. Still unbound is nice to use as it will allow you to use dnssec and will cache dns if you opt to turn all that off in the browser.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB