Pipe Dream

He has: 688 posts

Joined: Feb 2001

Short version: I know this is stupid but is there anyway to make it so that if your server is down, your visitors could still be automatically redirected to a different server/site?

Long version:

I'm pretty sure this is completely impossible but my friend has a high volume website on it's own server (in his home). For whatever technical reason it breaks own every couple of weeks and we've got to wait until he gets home from work to reset everything (provided he even knows it went down).

I've got extra space and bandwidth. He still wants to do his own hosting but I was wondering if there were any other way I could help him out. Is there some *magical* way that when his site is unavailable, visitors *somehow* get redirected to a special page on my site telling them that he's experiencing technical difficulties (and relay addiitonal information to them if needed). My limited knowledge of how the internet really works tells me that this could only be done with a DNS change, which couldn't be done automatically and would also need up to 72 hours to propogate.

Am I right that this is just a pipe dream?

He has: 1,016 posts

Joined: May 2002

(Just woke up so I only read the short version...)

It is very simple thing to do. You basically set up the same site on 2 different servers and at your domainregistrar you enter the nameservers for both servers. For example...

ns1.serverONE.com
ns2.serverONE.com
ns1.serverTWO.com
ns2.serverTWO.com

What happens is when a user tries to load your site and the first server (serverONE) is down it will try to connect to serverTWO.

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

*makes mental note*

thanks Smiling

He has: 688 posts

Joined: Feb 2001

Will "the internet" always try the name servers in order, trying name server number one first? Somebody else just told me it won't work. They said:

Quote: the list of name servers are not chosen in any order, pure random. So put your thinking cap on that one.

In other words, they warned me not to do this unless it was a mirror website (not just a "out of order" page). Any additional input? Any website's that explain how this works in detail?

Thanks.

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

I've found out the same thing. When a query is made for an IP address associated with a certain site, the DNS server will give all the IP adresses and it will be up to the client (surfer's computer) to decide which to use. Might as well be random. Obviously if one server is down, another will be used, but there is no standard device to test the content of the page served.

Apparently there are scripts that can be implemented to acheive what you are trying to do, but they are pretty involved and not for the casual webmaster. In other words...I don't have a clue. Smiling

They have: 11 posts

Joined: May 2003

The idea of having multiple name servers to solve this problem is completely incorrect.

The poster made the assumption that, giving this nameserver setup:

ns1.serverONE.com
ns2.serverONE.com
ns1.serverTWO.com
ns2.serverTWO.com

serverONE is actually hsoted on the same machine that the website is on.

So lets look at this a bit more:

mydomain.com 10.10.0.1
ns.mydomain.com 10.10.0.1
ns2.mydomain.com 10.10.0.1

Yes, thats right, in this example we are self hosting our dns on the same server as the website, a bad idea, but a lot of people do it.

IF the server is down, dns is down.

However, if we had:
mydomain.com 10.10.0.1
ns.mydomain.com 10.10.0.2
ns2.mydomain.com 10.10.0.3

where as the nameservers are on different machines than the website, and more importantly, the mail server, then if the website goes down (say the webserver died) mail would still go through.

But what you really want, is a warm standby server.

So, you need round robin dns going, which basically means setting up two addresses for one domain in the dns servers.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.