Comments (15)
The caching part is planned. Prefetching might be tricky to do right, and I doubt an unbound-like prefetch would benefit local LAN without enough clients to amortize it. A knot-resolver type of prefetch with prediction could be interesting, but far more complex.
We'll start with simple caching :)
from nextdns.
Fixed by 0e2dc7a. Please play the new cache-size
configuration option.
from nextdns.
How long are results cached for?
If the whitelist/blacklist is updated is the cache cleared? If not, it might be handy to have the client invalidate the cache if a configuration change is made.
from nextdns.
It is an AST cache, it will keep the most popular entries until the size of the cache is reached, replacing least popular entries by new ones then. When a query is performed, if the minimum TTL of the cached entry is still valid, the entry is used, otherwise, a request is performed to the upstream. If the upstream can't be reached, the stale cache entry is used instead of returning a SERVFAIL.
Blocked entries have a TTL of 5 min set by NextDNS, they will then be invalidated after 5 min. Note that your OS is also performing the same kind of caching, so clearing one cache and not the other won't have much effect.
from nextdns.
@rs -cache-size
is in byte size, not TTL?
I would prefer to say to cache 30 seconds , for example
from nextdns.
Please read my message above.
It does not make sense to force the eviction of a cached entry if there is still space available in the cache. Those entries can be useful in case of upstream reachability issue. The AST eviction algorithm will make sure that least popular entries give up space for most popular ones.
from nextdns.
Great work. This is great, thank you so much for providing this feature.
I have a question since cache will depends on original TTL for unblocked by NEXTDNS dashboard. If there is a website that has TTL for 1 year for example and already cached in the client of NEXTDNS then later from NEXTDNS dashboard I have blocked it by category or specifically. I think it will not be blocked until it got purged from NEXTDNS client, right?
from nextdns.
@rs I am thrilled to see the progress on this! Many thanks!
I did log two new issues based on testing I have been doing. If you would prefer I log issues in this thread instead of opening new issues, let me know and I will move the details over to this thread.
from nextdns.
@gam-phon that is correct. We can provide a max-ttl option to cap the TTL of entries to workaround that.
from nextdns.
@Fail-Safe new issues are better.
from nextdns.
Blocked entries have a TTL of 5 min set by NextDNS, they will then be invalidated after 5 min. Note that your OS is also performing the same kind of caching, so clearing one cache and not the other won't have much effect.
Thanks for the update. I've noticed that devices on my network respond much faster than 5 minutes when unblocking a site. Does restarting the NextDNS client flush the cache?
from nextdns.
Our clients flushes the DNS cache of the host yes. It's actually a side effect, but a convenient one.
from nextdns.
Any way to get statistics of how the cache is performing?
from nextdns.
Yes, can you open a ticket?
from nextdns.
Done, see #154
from nextdns.
Related Issues (20)
- REQUEST: set subnet to have none NEXTDNS routing. exclude or profile = none HOT 1
- error to install on Arch Linux
- Install script does not work on Digital Ocean Debian 12 image HOT 2
- Wrong ultralow for past 2 years HOT 7
- UniFi native(-ish) DNSCrypt handling? HOT 3
- UniFi UXG Pro Device Firmware Version 3.1.16 Failure Bug HOT 4
- Support authentication with GitHub in installer script for increased rate-limits HOT 1
- NextDNS CLI on pfSense: "sudo nextdns log" Returns "Error: exit status 1" HOT 1
- Identify Client Correctly HOT 2
- Conditional config and device name reporting stops working HOT 2
- UnifiOS UDM SE NextDNS CLI Unreliable HOT 15
- NextDNS Latency Discrepancy: Salvador vs. Rio de Janeiro HOT 3
- UDM SE update to 3.2.12 rerunning 1.42.0 installer does not work. HOT 8
- DNS64 support HOT 5
- UDM (or UDR) with Firmware 3.1.16 and Network 8.0.28 cannot install HOT 9
- NextDNS package not reinstalled on UDM/UXP firmware upgrade HOT 13
- Add the possibility to hide the taskbar icon on Windows 1x HOT 7
- Install without Tray Icon & still setup profiles HOT 3
- Online Installer no longer working on Unifi Dream Machine HOT 19
- NextDNS Install does not persist after UDM Firmware Update HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextdns.