Prefetch threshold

Has anyone considered an enhancement to unbound prefetch to be able to configure the threshold to trigger when the prefetch runs instead of hard coding it to 10% of the TTL? My intent was to handle cases where the DNS is unreachable, but still allow an application to continue working by using the previously known IP addresses. So in my world I would set prefetch=yes, cache-min-ttl=1D, new_prefetch-threshold=1D minus 5 minutes. In this way I would be able to refresh the DNS every 5 minutes, but be able to work for up to a day without a valid DNS entry.

Thanks,

Andrew Rampulla

Hello!

Great question! I also interested so much in such option to tune “prefetch” without changing code! :slight_smile:

Hi Andrew,

So, you would like to serve expired data (with TTL 0) and use
prefetching to renew data before it expires? That is exactly what the
serve-expired option does.

This option is available in Unbound 1.6.0.

Regards,
-- Ralph

This is the perfect feature for me. Do you know what the release schedule looks like for Unbound 1.6? I see it is in RC now, but was looking for an idea on official release of 1.6.

Andrew Rampulla

    Hi Andrew,
    
    So, you would like to serve expired data (with TTL 0) and use
    prefetching to renew data before it expires? That is exactly what the
    serve-expired option does.
    
    This option is available in Unbound 1.6.0.
    
    Regards,
    -- Ralph