<div dir="ltr">Hi Kevin,<br><br><i>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></i><br>We are looking to prepare a solution similar to this, to serve back records for <b>FQDN</b>s in case of <b>timeout </b>from the DNS server.<br>We want to understand how we can extend systemd-resolved to override response from DNS server in case of timeouts/failures.<br><br>Thanks<br clear="all"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif">Aditya</span><br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 13 Feb 2023 at 16:35, Kevin P. Fleming <<a href="mailto:lists.systemd-devel@kevin.km6g.us" target="_blank">lists.systemd-devel@kevin.km6g.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><u></u><div><div>On Mon, Feb 13, 2023, at 05:38, Aditya Sharma wrote:<br></div><blockquote type="cite" id="m_1486754273560474075m_-3121168538096763098qt"><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></div></div></blockquote></div>