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.