Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DNS Resolver Root Server Question

    Scheduled Pinned Locked Moved DHCP and DNS
    17 Posts 4 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator @thiasaef
      last edited by

      @thiasaef if you want to forward then forward.. Restarting of unbound, yes clears the cache.

      I have not seen such issues, my unbound normally runs for days and days - restarts normally when I do something that restarts it, etc.

      
      [22.01-RELEASE][admin@sg4860.local.lan]/root: unbound-control -c /var/unbound/unbound.conf status
      version: 1.13.2
      verbosity: 1
      threads: 4
      modules: 2 [ validator iterator ]
      uptime: 323100 seconds
      options: control(ssl)
      unbound (pid 97316) is running...
      [22.01-RELEASE][admin@sg4860.local.lan]/root: 
      

      What is that like almost 90 hours..

      If you think 1 or 2 ms has anything to do with anything.. Then sure ok, forward if you want.. But I will resolve.. I have no want of sending all my queries to some service.

      The only possible reason I could see forwarding, is if they provided something like filtering that I wanted to leverage. Or your on a internet connection that has bad latency or peering, etc.

      If your unbound is restarting all the time - then cache is not going to be very good..

      But response from when cached is going to be less than 1 ms, your best time there is 9ms too google..

      You can also tweak unbound to do prefetching, so stuff you normally go too is more likely to be cached. And you can set to serve 0, so even if past the ttl you get the last IP of that fqdn, and then its relooked up in the background, etc. etc..

      You do you.. Which is why there are many options and configurations possible for a user to decide what they want to do, etc.

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      T J 2 Replies Last reply Reply Quote 0
      • GertjanG
        Gertjan @thiasaef
        last edited by

        @thiasaef said in DNS Resolver Root Server Question:

        Resolver (pfSense @home):

        drill forum.netgate.com
        ;; Query time: 179 msec

        Ah lol. Let me try that one (using the resolver as a resolver == pfSense default DNS settings ) :

        drill forum.netgate.com | grep 'Query'
        ;; Query time: 0 msec

        There.
        0 or zero.

        Because : I've just read your forum post, so "forum.netgate.com" lices in my unbound cache. I guess it lives forever in my cache as I do what JP already said :

        4ba60cf9-a161-4146-aba9-4c104ea6bc12-image.png

        edit : 8.8.8.8 or 1.1.1.1 couldn't do this. If they would, after a day or so, they would have to cache all the existing host names on the internet. Just keeping that updated is already impossible. Indexing a cache that big (penta bytes cache size ? Bigger ?) wouldn't be a "x ms" thing any more.
        You've demonstrated it : after one hours, it really looked like that forum.netgate.com wasn't in the 1.1.1.1 cache anymore, so 1.1.1.1 had to resolve for you.
        You, on the other hand, woun't visit "every possible domain" on the Intranet every day, your DNS footprint will be small, maybe a couple of thousand host names ? and that is something unbound can handle just fine, and keep it updated.
        Let's check : Status > DNS Resolver : 700 entries.

        edit in edit :

        d2aa1d39-4bc0-4c5b-9aad-35052e74167a-image.png

        Restart the unbound service (see arrow) and then refresh the page : the cache won't be empty, as the cache was exported to a file before stop, and read back upon start 👍

        so I let unbound populate his cache, and unbound keeps it updated. So it stays valid and up to date when I need it.
        If 'time' consumed for DNS handling was an issue for me, I guess I nailed it.

        And yes, I tend to keep unbound running as long as possible ;)

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        johnpozJ 1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator @Gertjan
          last edited by johnpoz

          @gertjan said in DNS Resolver Root Server Question:

          as the cache was exported to a file before stop, and read back upon start

          While I know this is possible - I did not think pfsense unbound was doing that?? Is that something pfblocker does or can do?

          [22.01-RELEASE][admin@sg4860.local.lan]/root: unbound-control -c /var/unbound/unbound.conf stats_noreset | grep cache.count
          msg.cache.count=5022
          rrset.cache.count=8956
          infra.cache.count=5704
          key.cache.count=379
          

          restart unbound

          [22.01-RELEASE][admin@sg4860.local.lan]/root: unbound-control -c /var/unbound/unbound.conf status
          version: 1.13.2
          verbosity: 1
          threads: 4
          modules: 2 [ validator iterator ]
          uptime: 66 seconds
          options: control(ssl)
          unbound (pid 10009) is running...
          [22.01-RELEASE][admin@sg4860.local.lan]/root: 
          
          [22.01-RELEASE][admin@sg4860.local.lan]/root: unbound-control -c /var/unbound/unbound.conf stats_noreset | grep cache.count
          msg.cache.count=29
          rrset.cache.count=129
          infra.cache.count=64
          key.cache.count=5
          [22.01-RELEASE][admin@sg4860.local.lan]/root: 
          

          While if unbound was restarting every few minutes or something - sure that would be problematic - more so you trying to look up something while it wasn't actually up.

          But even when doing a full resolve of something all the way down from roots, your taking a few extra ms.. If there is nothing wrong means nothing more than a few extra ms.. If your obsessing over a few ms in query time.. That can not even be noticed by human.. Lets say it takes 200 ms to resolve something... That is .2 of a second.. Do you really think that is going to cause a page load to be noticeable slower??

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • T
            thiasaef @johnpoz
            last edited by thiasaef

            @johnpoz said in DNS Resolver Root Server Question:

            If you think 1 or 2 ms has anything to do with anything..

            No, but 170ms does and that's why I personally stopped using the resolver mode shortly after upgrading from 2.4.5-p1 to 2.5.2+, simply because I couldn't stand the performance impact any longer - not because I would prefer it.

            But response from when cached is going to be less than 1 ms, your best time there is 9ms too google..

            The initial response from google will be cached locally as well ...

            You can also tweak unbound to do prefetching ... And you can set to serve 0

            Yes, that works well if Unbound does not restart frequently - which it does if you run 2.5.2+ and have multiple end user devices directly attached to the firewall without an intermediary switch.

            You do you..

            Yes, but you were the one that said: "There is zero reason for any other dns service", which implies that anyone who does is stupid.

            @gertjan said in DNS Resolver Root Server Question:

            I guess it lives forever in my cache as I do what JP already said

            Only if you access the forum more often than once every hour.

            @gertjan said in DNS Resolver Root Server Question:

            edit : 8.8.8.8 or 1.1.1.1 couldn't do this ...

            Sorry, but you obviously don't understand what enabling "Prefetch Support" actually does.

            johnpozJ 1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @thiasaef
              last edited by

              @thiasaef said in DNS Resolver Root Server Question:

              but 170ms does

              no not really ;) 0.17 seconds... Your talking the blink of an eye time...

              That is a full resolve time.. Happens now and then when your looking up something that needs to be fully resolved..

              Again you do you.. But being worried about a few ms here or there is not very productive... Your not flash trading stocks ;) You a high frequency stock trader worried about nano seconds ;) heheh

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              T 1 Reply Last reply Reply Quote 0
              • T
                thiasaef @johnpoz
                last edited by thiasaef

                @johnpoz said in DNS Resolver Root Server Question:

                0.17 seconds... Your talking the blink of an eye time...

                times the number of sequentially executed queries per page. Example (cnn.com):

                ... more than 60 DNS queries in total.

                johnpozJ GertjanG 2 Replies Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @thiasaef
                  last edited by johnpoz

                  @thiasaef queries are not sequential. If you load up a website that has say 4 or 5 different fqdn to load stuff from.

                  It doesn't have to wait 170 ms for fqdn1 to be resolved before it asks for fqdn2, etc..

                  If you look at first query there, and then last query your talking a total of .471 seconds..

                  Your dns query time is going to be a very very small fraction of the load time of that site..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    thiasaef @johnpoz
                    last edited by thiasaef

                    @johnpoz said in DNS Resolver Root Server Question:

                    @thiasaef queries are not sequential.

                    Agreed, but some are definitely interdependent.

                    Your dns query time is going to be a very very small fraction of the load time of that site..

                    Same test with Unbound in resolver mode:

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan @thiasaef
                      last edited by

                      ... and yes, if you want to look at cnn.com, then half the planet has to made aware of that.
                      Every big iNet player does that these days.

                      On the other side : cnn.com isn't doing DNSSEC ( "DNS fact checking" ?! ).
                      If the did, you could see a triple the number of queries, and some of them will be to big for UDP, so TCP (slower) will kick in.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • J
                        jpvonhemel @johnpoz
                        last edited by

                        @johnpoz said in DNS Resolver Root Server Question:

                        I have no want of sending all my queries to some service.

                        I too do not want my ISP or another third party, ie google, comcast, or cloudflare building a browsing profile and profiting, but I also would like performance to be optimal at the same time. Seems fair to sai that unbound enhances privacy out of the box.

                        Privacy seems all but lost these days, but I want to limit the loss and avoid being someone's product.

                        1 Reply Last reply Reply Quote 0
                        • T
                          thiasaef
                          last edited by thiasaef

                          Actual page load time (PerformanceTiming.domComplete - PerformanceTiming.navigationStart) of www.bbc.com:

                          Forward [1st run || 2nd run] || Resolve [1st run || 2nd run]
                                    0.87 s || 0.89 s   ||           1.65 s || 0.84 s
                          

                          @gertjan said in DNS Resolver Root Server Question:

                          On the other side : cnn.com isn't doing DNSSEC

                          97 % of all .com domains are unsigned as of now: https://rick.eng.br/dnssecstat/

                          @gertjan said in DNS Resolver Root Server Question:

                          If the did, you could see a triple the number of queries

                          ftp.isc.org supports all bells and whistles related to DNSSEC:

                          Resolve [1st run || 2nd run] || Resolve +DNSSEC [1st run || 2nd run]
                                    1.05 s || 0.95 s   ||                   1.28 s || 0.96 s
                          
                          1 Reply Last reply Reply Quote 0
                          • N NOCling referenced this topic on
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.