7 Replies - 3071 Views - Last Post: 27 January 2014 - 02:48 PM

#1 mando414  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 37
  • Joined: 10-December 09

DNS Ubuntu Server

Posted 27 January 2014 - 02:19 PM

Why is my ubuntu web server faster externally when i dont set a specific dns?
When i set google as my dns, and access my webpage externally it is significantly slower.
Is This A Good Question/Topic? 0
  • +

Replies To: DNS Ubuntu Server

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:28 PM

Are you asking about dns for browsing or serving web pages?
Was This Post Helpful? 0
  • +
  • -

#3 mando414  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 37
  • Joined: 10-December 09

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:30 PM

Serving web pages.
The DNS on the web server itself.

This post has been edited by mando414: 27 January 2014 - 02:31 PM

Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:34 PM

How are you setting google as your dns? Who did you register the domain through? They will have an interface to point to your nameservers. The nameservers will point to the dns server.
Was This Post Helpful? 0
  • +
  • -

#5 mando414  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 37
  • Joined: 10-December 09

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:38 PM

i changed the dns through /etc/resolv.conf, i did this so i could also browse the internet on my web server.
Was This Post Helpful? 0
  • +
  • -

#6 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:41 PM

That isn't dns for serving, that's dns for browsing. You should use your isp's dns servers.

It's likely slower because rather than hitting your router & serving the page, it's going to the outside world (through Google) to resolve the dns of the site & serve back.

Local dns, the site self-resoves & is faster.
External dns, the site goes over the internet & isn't as fast because there are more hops.

You can verify this with traceroute.
Was This Post Helpful? 0
  • +
  • -

#7 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 332
  • View blog
  • Posts: 1,209
  • Joined: 15-January 14

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:41 PM

If the server is using a third-party DNS resolver then it's going to take longer than if it's just using itself.
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: DNS Ubuntu Server

Posted 27 January 2014 - 02:48 PM

You are misunderstanding dns.

Local traffic :
Your server goes to your router, your router says : I know where that is, that's on our network, you fetch packets from the server.

Verify with traceroute, you will have 2 hops.

External traffic :
Your server asks google (as per the dns ip you have in resolv.conf) which is off the network, so already you go to the router, to your modem, & ask your isp to resolve a domain name to an ip. You get the ip (which is extrnal, not internal), so you now request traffic on port 80 at the external ip. The packets go to your isp, which forwards them to your modem to your router to the server. & then all the way back.

Verify with traceroute, you will likely have 8 to 10 hops, if not more.

Each time you push packets through a hop, it adds time. Changing dns on your server through resolv.conf will do nothing for your sites speed, except for on the server itself, to itself.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1