To further optimise cache performance

Ping/Probe mechanism: To further optimise cache performance in pi-hole, the user could implement a “ping” or “probe” mechanism that sends a quick TCP/IP packet at an interval to the resolved domain address before the user actually visits the website. This would help ensure that the DNS entry is still valid, and the domain address is reachable, which this can save time when the user eventually loads the webpage from their bookmarks. The user would need to add a list of bookmark site to a list for this scheme to work.

Please elaborate on how this optimizes cache performance.

Once Pi-hole resolves the domain, the domain is cached by Pi-hole (and likely the client) for the duration of the TTL (Time to Live).

Note that with Pi-hole v6.0 we already implemented a feature called "cache optimizer" which will immediately reply with data even when you haven't visited a page for a long time. A query refreshing your cache is triggered asynchronously, there is no delay for your client.

If Pi-hole allowed users to input bookmark specific domains within a whitelist, it would be possible to regularly ping these domains at intervals (e.g., every 10–30 minutes). This approach is similar to prefetching, where cached IP data becomes readily available. My inquiry stems from my personal experience with the Feedbro Reader browser extension, which periodically pings news sites every 30 minutes. By having the requested domains already cached, I've noticed significant improvements in load times.

That feed reader seems to actively scan subscribed feeds for new posts every 30 minutes. It then can download parts of their contents before you decide to read them (or to discard them without reading).

Pi-hole never sees any downloaded contents at all, and neither would it be queried for it - it only receives and answers DNS requests, and those requests are already cached for as long as the DNS reply indicates (via the TTL jfb has mentioned). Furthermore, the DNS client portion of most OSs would do the same.

Okay, thanks

Ping is not the same as a DNS query.

You are asking that Pi-hole actively contact domains, which is quite a bit different than it's current role as a DNS resolver.

As @dl6er noted, the upcoming V6 has a cache optimizer feature, which updates the domain record without actively querying the domain.

1 Like

I will have to read more into optimiser feature.

Cheers.

1 Like