Author Topic: DNS querying too slow? - install pdnsd  (Read 1218 times)

DNS querying too slow? - install pdnsd
on: May 31, 2006, 22:39:37 PM
Something I hate....  waiting (about a whole second) for my ISPs DNS server.

it sucks, really slows down the whole browsing experience.

So, I have sorted it out :)

fire up the ol terminal, and type in:
Code: [Select]
sudo apt-get install pdnsd

Itll install it, add the user and set it running for you.

You can edit the configuration file by doing:

Code: [Select]
sudo /etc/pdnsd.conf

obviously where is your fave.. gedit, nano, Vi etc

I added a line to the top section, below the max_ttl called min_ttl

max_ttl=604800;
min_ttl=1200;

dont forget that semi-colon ; at the end!!

1200, so it caches a name for a minimum of 1200 seconds... so I wont be getting a new DNS query to my ISP for a long time, when I try visiting a frequent website :mrgreen: The max ttl is the default (one week! non-issue for me, my PC goes off overnight)

then type in:
Code: [Select]
sudo /etc/init.d/pdnsd restart

Dont forget to add the DNS server to your networking!

System menu > Administration > Networking > DNS tab - add 127.0.0.1

jobs a goodn ... enjoy INSTANT dns lookups 8)

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
DNS querying too slow? - install pdnsd
Reply #1 on: May 31, 2006, 23:00:14 PM
Which is a really good except for when a site moves IP and then you could have to wait for upto a week for the DNS update to happen on your machine.

It is a nice idea though :)

Re:DNS querying too slow? - install pdnsd
Reply #2 on: May 31, 2006, 23:30:34 PM
I use one on my windows machine here. Used it for yonks.

No issues with it keeping up to date, as it serves the cached address to your computer, then queries for dns.. if the address is different, it then updates its records instantly and serves the new address across to your computer.

Cant remember the name of it as its on my tower pc not this laptop but it begins with A.

Really simple. a quick install and a change of the network settings. and Voompf! works instantly.

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
DNS querying too slow? - install pdnsd
Reply #3 on: June 01, 2006, 09:24:35 AM
That sounds like quite a good idea, query after returning from cache. Worse case is you have to F5 / retry once in a while.

Much like I just had to do when posting:

Quote

503 Service Temporarily Unavailable
The server is temporarily unavailable due to maintenance downtime or excessive load.

Resin-3.0.18 (built Fri, 24 Feb 2006 02:47:03 PST)


Thats special :)

Re:DNS querying too slow? - install pdnsd
Reply #4 on: June 01, 2006, 20:55:15 PM
Well, I reboot nightly...  so its probably all cleared I believe, every 24hrs.

and waiting a week is unlikely, thats the max_ttl - the absolute maximum the server will allow. It over-rides the records value if it is set over a week. Most stuff wont be, and will need to be re-cached before then anyway (probably be more like 24 or 48 hrs)

I set the min_ttl value to over-ride some values which may be (however unlikely) less than 1200 seconds....  does the opposite of the max, if someone sets their DNS entry to last only 120 seconds (just as an example) - well, my server bumps it up to 1200 seconds, to prevent me fetching from my ISP every 2 minutes.

If I do come into a problem, just typing in:

Code: [Select]
sudo /etc/init.d/pdnsd stop

and trying again will work, as itll just use the ISPs DNS servers...as I wont get a reply from 127.0.0.1.  The ISP servers are always around 48 hrs out of date anyway and I never have a problem with moving websites...  so I dont think Ill get any issues here, to be honest.

I cant remember where at the moment, but somewhere pretty easy to get to, is the actual cache file, so at the very worst you could have to remove a line from there or just delete the thing to start from scratch.

Never seen a 503 error on here before...  :?

0 Members and 1 Guest are viewing this topic.