5

I'm looking for a proxying/caching DNS Linux server, that is able to serve stale (expired) records if it cannot obtain updates from upstream.
Bonus points, if it can be configured to use stale record when upstream takes too long, and then update the cache asynchronously when/if the response arrives.

The required behaviour is quite similar to proxy_cache_use_stale nginx directive — serve fresh upstream whenever possible, serve whatever you have when upstream is down.

dnsmasq can forcibly extend TTL of cached records, but this fails on both points — clients get stale records with live upstream, and once extended TTL finally expires and upstream is down — clients get nothing.

Earwin
  • 153
  • 4
  • you mean http://unix.stackexchange.com/questions/287836/how-to-override-ttl-in-a-caching-only-bind9 – Jacob Evans Nov 29 '16 at 03:41
  • 1
    sadly this is on everyone's mind with the whole ddos of dyn fiasco, not much for holding records and only invalidating them if a new record exists. – Jacob Evans Nov 29 '16 at 03:42
  • @JacobEvans no, as I mentioned above, simply overriding the TTL is pointless, you need a different mechanics. – Earwin Nov 29 '16 at 08:24
  • 1
    I wonder if powerdns has a way to create a shared, persistent cache...... – Jacob Evans Nov 29 '16 at 11:51
  • Hm. A cursory look tells there's no out-of-the-box functionality like I require in powerdns, but it is scriptable, so something can possibly be crafted. Thanks! – Earwin Nov 29 '16 at 12:00
  • please post back your results! not as easy feat as it directly conflicts with the expected behavior of dns. – Jacob Evans Nov 29 '16 at 12:06

1 Answers1

5

I know similar feature in unbound DNS.

From unbound docs:

   serve-expired: <yes or no>
          If enabled, unbound attempts to serve old responses  from  cache
          with  a  TTL of 0 in the response without waiting for the actual
          resolution to finish.  The actual resolution answer ends  up  in
          the cache later on.  Default is "no".
pahaz
  • 166
  • 1
  • 2