0

How many DNS-records fits in the recommended 10 MB cache?

Just curious how many DNS-entries fits in the recommended 10 MB cache in CLI? Will it add records until the 10 MB is filled in memory and then the oldest record will be replaced or is stale DNS-records deleted in advance? I read that it works as a sort of redundancy if the DNS-servers can't be reached, but does it also use stale DNS-records in that scenario?

When I have checked the command "nextdns cache-keys" a few times the largest mine have been is around 1.500 entries, but is this maxed out? Any way to check how much the cache is filled up (in % or MB) any time or should we just use 10 MB and not ask any questions? 😉

8 replies

null
    • NextDNs
    • 2 yrs ago
    • Reported - view

    That's is correct, it will keep stale records in memory and use them in case of issue talking to the upstream. Least used entries are replace with new onces the cache reaches the 10MB size. 10MB can hold a lot of records if you consider a typical DNS response is in the 50-100 bytes.

      • Pro Subscriber ✅
      • Jorgen_A
      • 2 yrs ago
      • Reported - view

      NextDNS Thanks for the answer! So if my math is correct a cache of 10 MB will then store ~100.000-200.000 entries if each record is 50-100 bytes. That's a lot! 😋

      • NextDNs
      • 2 yrs ago
      • Reported - view

      Jörgen it's decent yes :)

    • Calvin_Hobbes
    • 2 yrs ago
    • Reported - view

    Would it be fair to say the 10MB setting is to prevent a malfunction from using too much space rather than for performance reasons?

      • NextDNs
      • 2 yrs ago
      • Reported - view

      Calvin Hobbes I'm not sure to get the question.

    • 🤖
    • MarkToon
    • 2 yrs ago
    • Reported - view

    I guess me changing that too 100mb was kind of pointless then 💥

      • Pro Subscriber ✅
      • Jorgen_A
      • 2 yrs ago
      • Reported - view

      Mark Wow, that's a cache-size for a global enterprise company. 😉 I lowered mine to 4 MB (~40.000-80.000 records), but even 1-2 MB would probably be more than enough for most home networks.

      • 🤖
      • MarkToon
      • 2 yrs ago
      • Reported - view

      Jörgen Ha ha yeah sounds like I went OTT, though I must say it's been running rather nicely.

Content aside

  • 2 yrs agoLast active
  • 8Replies
  • 508Views
  • 4 Following