Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
I've now got it all working again but I'd like to future proof myself.
Is it possible to run virtual sites on two different named servers running at two different locations. That way my if my primary server went down or was hit by a dos attack (something esle this world class hosting company has suffered) the sites would still be running on the second server.
Of course there would be potential problems with version control and online database entries but I can work round them, I just like to know if what I'm suggesting would work.
That can actually be at either the software level or at the router/hardware level.
Having spoken to a my existing hosting company and the one I'm thinking or using as well, they are unconvincing vague on this.
Please correct me if I'm wrong, but my understanding is :-
a domain name can have a number of named servers and for the purpose of this we will have two
each of these has a different ip address
my virtual site exampel.com has the two above named servers.
When someone types in example.com and everything is going well they will get directed to the primary named server ns.somewhere.com
If ns.somewhere.com goes down for any reason (DOS attack?) then when someone types in example.com it can't find it at ns.somewhere.com so it goes to ns.anotherplace.com
In my mind that's how it should work but I have a nagging suspicion that there may be something I'm missing like for instance when I ping a web address I get the ip of the primary server
Your thoughts would be appreciated
If your machines are located with them, they can fail over to a second local box using your existing domain name and public IP address. If they can't do that, they should be able to fail over the DNS entry by pointing your existing domain name to a different IP address. (If they can't do one of these for you, I'd shop around.)
Just to validate this as a concept I have set up a virtual site on two different named servers, each version has a slightly different home page, so in the event of a switch I could tell it had happened. The problem is that without switching off the primary named server how do I test this?
I have tried suspending the site on the primary named server and it just comes back forbidden (which makes sense because the primary named server is still active)
I suppose I could do a reboot and check whilst it was rebooting but that seems a bit drastic, so before I try that does anyone have any better suggestions?
If the machines are communicating to the world from a private IP range (IE 192.168.x.x), your router needs to start handing traffic for 'www.yourdomain.com' to the backup box when the primary goes down. If you're using commercial hardware, I expect this can be automatic. If you're using consumer hardware like in a home network, you'll probably need to do this manually. I know my (cheap) routers at home won't do this automatically.
If it's a pair of machines on public (IE real, routable) IP addresses, you'll probably want to change the DNS entry to point 'www.yourdomain.com' at the second machine's IP address in event of failure. This can be configured with something like dyndns.org.
You might also look into linux cluster solutions and some hosting providers also offer "cluster packages" and do the whole job for you.