-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store cache with Redis / Valkey #66
Comments
What problem would the cache solve that the current in-memory cache does not address? Is the use-case sharing the cache between several Leng instances? |
Yes that would be the use case. I imagine most records would have a decent enough ttls for it to be beneficial in reducing lookups to the upstream dns server. |
I am not super convinced of how beneficial this would be, considering the complexity it adds. Assuming the shared cache is on a different node:
I don't think we can answer (1) without knowing the built-in cache hit-rate. I think I will add a metric for this in the next release, it is something that I am now curious about! As for (2), I guess that very much depends on your setup. Even if your redis cache is in the same datacenter as Leng, and you are going to So I think I can only see this being very useful if your machines are wired up together in your house, but the internet is far away? At any rate, I will build a new metric for the cache hit-rate and we can see how that does. Let me know what you think! |
That would be a good metric to add! Another note that was pointed out would be increased privacy from the upstream DNS server, they wouldn't be able to see as much / track your habits. That being said I am also not sure how much of an advantage it is to be worth it, it wouldn't be complex for me to configure at least and I'd be happy to test, but code complexity for saving a couple ms may not be worth it. Edit: also jealous of your ping time. I get 20+ on my coax and 50+ on my backup 5g wan! |
Hi @seang96 did you manage to use the metric in order to estimate your cache hit-rate? On my end, I have since your issue spotted this 0xERR0R/blocky#945 which reflects the added complexity Redis can bring to leng. |
I am using v1.6.1 and I still don't see the metric. It looks like that was released before it was added looking at the dates of commits and releases? |
ah sorry about that - it's been in master for a while, just not as part of a release. You can run it with the tag sha-20f09ef (assuming you are using containers here) |
I updated and see it now. Githubs mobile app sucks and doesn't show packages or at least I can't find it. I'll let it collect for a little bit and let you know how it goes. Thanks! |
Saw this mention in another DNS service, and thought it would be a nice addition though may also be an anti goal of keeping it simple, keeping existing support would hopefully eliminate that as a concern.
The text was updated successfully, but these errors were encountered: