Faster internet browsing?!?!

RobRob Detroit, MI
edited July 2003 in Science & Tech
Well, I was bored i guess. I've been playing with DNS servers lately and had an idea.

Hell, I've got a decent system. Its always on for weeks on end. Why should I use an ISP DNS server? I have more overhead on this machine than most ISP's dedicate to DNS anyway... Not like it uses much.

So, I loaded bind on my desktop, started it up, changed my /etc/resolve to 127.0.0.1 and poof, my own DNS cache.

The side effect I didn't think much about, my DNS lookups are almost instant now. Browsing has dramatically increased. Pages come up almost instantly now, no hesitation whatsoever. Remote shell sessions start immediatly, no DNS resolution to wait for.. kinda cool ;)

Comments

  • EnverexEnverex Worcester, UK Icrontian
    edited July 2003
    Er....... but how does your machine know what the addresses are initially?

    NS
  • RobRob Detroit, MI
    edited July 2003
    Bind makes the DNS calls and cache's it locally.
  • RobRob Detroit, MI
    edited July 2003
    Local uncached time

    ;; Query time: 29 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)


    ISP uncached time

    ;; Query time: 191 msec
    ;; SERVER: 68.42.244.5#53(68.42.244.5)

    Local cache time

    ;; Query time: 1 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)

    ISP cache time

    ;; Query time: 16 msec
    ;; SERVER: 68.42.244.6#53(68.42.244.6)
  • edited July 2003
    True-- Linux can have multiple DNS servers specified. So, DNS 1 is 127.0.0.1, DNS 2 is 68.56.0.XXX, DNS 3 68.56.0.yyy (on my box anyway, and actually I have 4 deep).

    The variable name used by networking in the routing files is: nameserver and if you have several it will happily cascade as needed. The only downside to the cache is sometimes you have to manaully remove a listing or several when websites change hosts. What I will usually do is trash the cache and let bind refetch when I get too many misses for favorite places.

    Also, if you have a website that you need to build up before DNS propagates publicly and you know the remote IP of the Host's DNS you can hard-code a route to it-- just remember you did this, as such are usually temporarily set up and made temporary quite deliberately. I did this with http://www.allposixwiki.com/ (which is still tiny and may be growing slowly for a while, but was deliberately established for the long haul). I also did a variant on this before sticking my other sites up on Hostway-- had to IP access the site area with FTP instead of name accessing it on my previous host service.

    Anything you can whois you can hard code-- that includes host's DNS servers for sites you buy domain space for. And you can do it in your box yourself until the public reg propagates. This lets you check a site before it is goes live, to function test it. I tend not to do this too much, only at need and for legit reasons as in the US it is legal to monitor webspace without notification (fairly specific warrant which is legally obtained yes, person(s) being monitored need not be notified).

    But, nameservers can be whois'd also. The internet, by definition, is public space and should be treated as such-- so do not regard as private and think you are able to protect as such easily and certainly things you send through that space.

    John Danielson, II
    (googleable)
  • RobRob Detroit, MI
    edited July 2003
    Well, my initial intent was to work closer with my DNS. The side effect was the speed.

    This allows me to dump the cache and recall as nessisary, insted of waiting for my ISP to drop the record. I guess its just a way around waiting for it to expire and relookup.

    Next trick might be to make it a secondary off the real DNS machines that hold my records, but the speed difference was something I wanted to comment on.
  • edited July 2003
    Right, local needs no network lag but has the downside of getting non-current easier and takes up local resources to maintain and use.

    Just wanted to balance the discussion out, your idea was good but it has some gotchas that might be thought out to decide if this is best for others who might read this. I am used to archive searching and many times context in other threads never gets found until reposted about as the gotchas bite and someone asks why they bit. This last is also why I do not try to approach forums as finely granular databases and go apparently sideways to show the logic apporach used as well as the possible fix. You do not (and I hope do not always) need to think exactly as do I, but seeing realtions helps to put ideas in contexts.

    IE: was not trying in any way to interrupt thread, jsut add perspective for other readers and fill possible gaps that might prove handy to consider.

    John Danielson.
  • kanezfankanezfan sunny south florida Icrontian
    edited July 2003
    i ought to be running my desktop on linux, but i've been so lazy, don't feel like a complete re-install of everything atm. anyhow, i use this little app called fastcache which does the same thing essentially, it's not a dns server, but you point your windows box to use 127.0.0.1 as its dns server, fastcache answers all dns queries, it caches the IPs of sites you visit, it definitely is an improvement over using my ISPs dns.
  • RobRob Detroit, MI
    edited July 2003
    getting non-current easier and takes up local resources to maintain and use.

    Well, DNS entries have a expiration period. Once the record has expired, it will be looked up again if its in cache or not.

    Think about it, its no different than running DNS here or on one of the servers in the NOC. You don't clear commercial DNS machines, the entries expire and are relooked.

    BUT, running a 3rd party app thats not a commercial server process might yield some interesting results.

    As for system resources, I run a dual 1600, 1 gig ram, 18G u160 for / and 40G EIDE for /home. I can't even find the resources it uses. Launching a terminal has 100X more effect than this does. Now if I was on a old single CPU POS with little ram, then it might be a issue ;)
Sign In or Register to comment.