<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Mon, Feb 13, 2023, at 05:38, Aditya Sharma wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi All,<br></div><div><br></div><div>We needed help in understanding how systemd-resolved service can be extended to cache DNS responses to protect against DNS server failures.<br></div><div><div>We were planning to maintain a cache so that we can override negative responses from the DNS server and replace it with our cached last known good record.<br></div></div></div></blockquote><div><br></div><div>This sounds very dangerous. A 'negative' response from an authoritative DNS server (NXDOMAIN, for example) is authoritative and should not be overridden.<br></div><div><br></div><div>If what you mean is that you want to serve 'stale' records from a cache when their TTLs have expired and the authoritative servers which provided them are not reachable, that's something that a number of existing recursive resolvers are able to do and it could be logical for systemd-resolved to offer it too.<br></div><div><br></div></body></html>