
11-22-2010, 03:06 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
Question about nameservers on different machines (servers)
I have setup 4 nameservers for a website. The first two nameservers are hosted on Server 1 and the other two on Server 2
If one server goes down, the one pair of nameservers wont resolve anywhere. Will the website keep working with the other two working nameservers? Does this need any propagation on user side?
I do not actually know how the nameservers work in this case. Any experienced member?
|

11-22-2010, 03:35 PM
|
|
Web Hosting Master
|
|
Join Date: Sep 2009
Posts: 1,409
|
|
Yes, it will work if you put as authoritative DNS servers for your web site domain name those 4 DNS servers.
|

11-22-2010, 03:38 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
Does it work instantly or is there any dns cache anywhere affecting it?
|

11-22-2010, 05:23 PM
|
|
Always Learning...
|
|
Join Date: Aug 2002
Location: Bharat
Posts: 4,575
|
|
If you are hosting your DNS on only two machines, you can do away with two NS only, one on each machine.
Even if one is up your site will remain up, assuming that both these NS are authoritative and your site is on a different server.
If you are hosting your site on two different servers with two NS on each, and first server goes down, for some visitors site will remain down because of DNS cache.
|

11-22-2010, 06:34 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
I will explain exactly what i want to do: I have 4 nameservers. 2 of them are in server No1 and the other two are in server No2. Website is hosted on Server No1. I am doing this because i would like to mirror my website to a second server so if Server No1 goes down, i will be able to log-in server No2 and edit dns zone (a records) of the website and point a records to the mirror server.
So, is this a good way to do this thing i want? What else should i do? My main aim is to mirror website and if first server goes down, i will be able to edit dns zone and make my site working from mirroring server.
|

11-22-2010, 07:24 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
Dear Vinayak_Sharma are you telling me to use two nameservers and not four? Is it for sure that i will have dns cache problem with 4 nameservers?
|

11-22-2010, 07:29 PM
|
|
Community Liaison
|
|
Join Date: Aug 2010
Location: /pub/bolton/uk
Posts: 3,158
|
|
Your idea is OK as far as it goes, but
1) You only need/want 1 nameserver on each server. Having more than 1 could result in more failed requests if one server is down.
2) The switch to server2 is not instant - Yes, as stated already, it's cached. So you'll need to reduce the TTL values for your A or CNAME records so that if/when you make a switch to server 2 the records are updated fairly quickly.
Is your site a static site, or a forum or something? If it's dynamic you'll also need to run a script to keep both copies of the site in sync.
|

11-22-2010, 07:56 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
Yes i know how to mirror this dynamic website. I also know that i will have to reduce TTL for a records to take effect.
My main question was if the two nameservers will keep working instantly as the other two will be down. Is it better for me to reduce nameservers to two instead of four? If i reduce them to two, won't i have dns cache issue?
|

11-22-2010, 08:07 PM
|
|
Community Liaison
|
|
Join Date: Aug 2010
Location: /pub/bolton/uk
Posts: 3,158
|
|
There's no point to having 2 nameservers on one server. If that server is down, both nameservers will fail. Imagine if your server1 is down and someone tries to go to your site, making NS requests in the order NS1, NS2, NS3 - that's 2 failed requests instead of one from server1 before server2 gets asked.
You asked earlier "Does it work instantly or is there any dns cache anywhere affecting it?" which is why I mentioned TTLs. The ISPs of the visitors to your site will be cacheing the info. Shortening the TTLs now will reduce the time server1's IP is stored at (most) IPSs before another lookup so that when you do have a failure and do your switch to server2, your visitors will start to land on server2 quicker, although still not instantly.
|

11-22-2010, 08:47 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
ok then. i suppose there is a reason why i should keep TTL's high. Isn't there? If there is no reason, then why all have by default high TTls and not change them to low numbers?
|

11-22-2010, 09:03 PM
|
|
Community Liaison
|
|
Join Date: Aug 2010
Location: /pub/bolton/uk
Posts: 3,158
|
|
Sure there is. As it's a reasonably safe bet that the vast majority of web sites aren't going to switch between servers all the time, the TTL controls the time the lookup is cached by (say) your ISP. It saves them asking again every time someone else wants the IP address of that same web site.
So, taking the default cPanel/WHM TTL of 14400 as an example, that's saying "you should cache this for 4 hours" (4x60x60 seconds).
In your specific case you want the ISPs to ask you more often in case your web site's IP does change, so you might use a TTL of 900 (15 minutes).
That's fine in isolated cases, but imagine if ALL the millions upon millions of DNS lookups performed daily were suddenly told to do it again every 15 minutes instead of 4 hours. That's 16 times those millions upon millions 
|

11-23-2010, 01:47 AM
|
|
Web Hosting Master
|
|
Join Date: Jun 2006
Location: NYC
Posts: 1,408
|
|
Quote:
Originally Posted by yello
I will explain exactly what i want to do: I have 4 nameservers. 2 of them are in server No1 and the other two are in server No2. Website is hosted on Server No1. I am doing this because i would like to mirror my website to a second server so if Server No1 goes down, i will be able to log-in server No2 and edit dns zone (a records) of the website and point a records to the mirror server.
So, is this a good way to do this thing i want? What else should i do? My main aim is to mirror website and if first server goes down, i will be able to edit dns zone and make my site working from mirroring server.
|
To be honest, why host it at all? Why not just manage your DNS free at your registrar? If you're not doing AnyCast or anything complex then it may make more sense to manage it with your registrar directly since most provide that option free of charge. The registrar will normally provide faster DNS responses than going to your system. Even if it may be a negligible speed difference, you would likely have 4 real nameservers for better redundancy.
|

11-23-2010, 02:50 PM
|
|
Newbie
|
|
Join Date: May 2008
Posts: 22
|
|
My domain names are registered through namecheap. I better trust my own servers for sure
I got the idea. Thank you all.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|