[Pdns-users] pdns-recursor peering

Brendan Oakley gentux2 at gmail.com
Fri Oct 12 19:58:18 UTC 2007

Hi Mick,

Depending on the application and purpose for wanting a shared cache, I
might try forwarding all queries to a single "master" recursor which
only serves the "front-end" servers, performing all root server
queries. It would only receive the queries that the front-end servers
cannot answer from their own respective caches, yet its cache would be
the same as the collection of the individual caches combined. This
provides both the load-sharing benefit of a pool of load-balanced
servers and the desired shared cache.

There are several downsides to this setup.

1. If the particular network has a high volume of unique queries, the
probability of the "front-end" recursors having the answers in their
cache is low, so the load on the master recursor might be too great.
However, in general that also means the probability of the master
recursor having the answers cached is also low, so the benefit of a
shared cache is diminished.

2. If the number of "front-end" recursors is very high, at some point
it becomes impractical to try to hold the collection of all their
caches on one server, and handle so many queries. Without testing I do
not know exactly how high that would be, but it would seem to be a
rare case.

3. It means a central point of failure takes away the redundancy
benefit of load balancing. This can be handled simply with a trigger
in your monitoring software which runs a script on the "front-end"
servers when the master recursor fails. The script would swap out the
recursor.conf for one without the forward-zones statement and execute
'rec_control reload-zones' so that they switch to doing their lookups
on the root servers while the master recursor is unavailable, without
clearing their caches.

4. If for any reason the master recursor's cache is cleared, the
benefit of it will be temporarily diminished. A possible solution is
to consider using a different recursor on it than PowerDNS, one which
saves the cache to disk and re-loads it on start.


More information about the Pdns-users mailing list