Replies: 2 comments 6 replies
-
You could add Redis to your setup which will store your DNS cache and blocky will automatically pull it on startup. Another option would be to run two blocky instances where the first would only cache and forward the requests(+ the IP of the requesting client) to the second which does the blocking. A third option would be a combination of both. In that case both blocky instances use the same Redis instances which synchronizes the DNS cache between both instances in addition to the restore functionality mentioned above. |
Beta Was this translation helpful? Give feedback.
-
Have played around with Redis and got it working... but I have a few more queries about how/ what Blocky stores/ reloads in Redis. I understand that Redis stores the keys with the same TTL as what Blocky returns. I am having a system where every client DNS request will only be fetched from upstream the first time, it will always be available cached the next time. Setting I have configured Blocky to always prefetch any query by using
Blocky works fine, i.e.
I have noticed that Blocky updates Redis for the first time it fetches the entry from upstream. However, when Blocky prefetches the entry to update its cache, it does not seem to update Redis. This means that Redis does not actually store a complete picture of Blocky cache. And a restart of Blocky does not restore the complete DNS cache Or have I misunderstood something? |
Beta Was this translation helpful? Give feedback.
-
It would be nice to have an (optional) ability to save and reload cache.
At the moment, adding whitelists/ blacklists/ making config changes requires a restart of Blocky and that loses all the built-up cache.
Is it possible to have the ability to save/reload cache - even if the memory file is saved as a binary blob file and reloaded as such.
I am aware that Blocky is supposed to run stateless and have minimal config (i.e. just 1 file)… but losing the built up cache on each restart needs some sort of resolution….
Thanks…
Beta Was this translation helpful? Give feedback.
All reactions