On 10/09/2025 14:12, Christopher Faulet wrote:
Thanks Damien. Indeed, there is an issue. But your patch does not really fix the issue because the requester is still released when the stream is released. If it is the last one, the resolution will still be released too and the cached result with it. So the only way to get a cached result on a do-resolv action is to have enough streams requesting the same FQDN in same time to always have at least one stream still alive to keep the resolution used.

Instead, I suggest to be able to keep orphan resolutions, when the last requester is a stream, and during at most the hold valid time. It means the resolver task should be responsible to clean expired orphan resolution. To do so process_resolvers() must be modified accordingly.

I will try to emit a patch soon, hoping it will be light enough to be safely backported...

Hi Christopher!

Indeed, my patch is only about doing some pooling to ensure multiple streams resolving the same FQDN do a single resolution, which is enough for my use-case as I have a lot of long-lived streams resolving a small set of FQDNs, with sufficient churn though to load the DNS servers without this patch. Having a real DNS cache would be much better but it seems way more complicated than this to me so I didn't consider it, especially with the mutualization of code for server-template resolution. Hope you'll get something nice and short!

Cheers,

Damien



Reply via email to