Web Hosting Talk







View Full Version : Hosting one site in two hosts...?!


fx1024
05-23-2002, 09:57 AM
Is it possible?

If I declare as 1st dns server the 1st nameserver of the A host and as 2nd nameserver the 1st nameserver of the B host, would it possible to the surfer to switch to the B host if the server of A host is down?

It's just an idea, maybe silly.:cartman:
Do you believe it might work?

If it works another problem is how to sync the mySQL dbs of two different servers... Parsing through PHP maybe and CRON jobs?

Satj2000
05-23-2002, 10:04 AM
You would need to use the same database fror both hosts.
Also the DNS idea won't work. Because the ns2 comes into action when only ns1 crashes or does not respond!
But you could place a script on host A which send your users randomly to either host B or C.
For host A I would use brinksters.com, free and without banner :)

Aussie Bob
05-23-2002, 10:25 AM
Originally posted by fx1024
If it works another problem is how to sync the mySQL dbs of two different servers... Parsing through PHP maybe and CRON jobs?
You're entering into the realms of black magic there. ;)

carolinahosting
05-23-2002, 10:34 AM
Originally posted by Satj2000
You would need to use the same database fror both hosts.
Also the DNS idea won't work. Because the ns2 comes into action when only ns1 crashes or does not respond!
But you could place a script on host A which send your users randomly to either host B or C.
For host A I would use brinksters.com, free and without banner :)
Interesting, so on Host A you would need to add Host B in the DNS record on host A for that to work?

So if I said domain.com

DNS Records: Name Servers

NS1.HOSTA. COM
NS2.HOSTA. COM
NS3.HOSTB. COM

Would that work?

Perfecthost
05-23-2002, 11:43 AM
I have to agree with Aussie Bob. We had a reseller try this and it caused dns issues. In digs, it kept pulling up ns4 first, then ns3, ns2, and finally ns1. Then, there was the email issue. The website would pull up on one server and mail on the other...no matter how many times everything was reset. It was a great idea on paper and in his head, but...

Definitely, black magic.:)

-Lamar

WCSWEB
05-23-2002, 03:08 PM
I think this formula will work :)

hostA.com

dns will be like this

ns1.hosta.com
ns2.hosta.com
ns1.hostb.com
ns2.hostb.com
MX mail.hostA.com
A IP (hostA.com)

hostB.com

Dns will be like this

ns1.hostb.com
ns2.hostb.com
ns1.hosta.com
ns2.hosta.com
MX mail.hostA.com
A IP (HostB.com)


with this scenario hostA.com will be the provider that you trust more because e-mail will be going to that server in stead of going to 2 diferent servers. Also since all 4 dns servers are in HostA.com and hostb.com dns entries if one of the servers goes down the other will pick it up. Since all 4 dns servers will be cached at the ROOT servers.

Then go to your registrar and make all 4 dns servers are attached to that domain.

with regards to the databases I will repeat what Aussie Bob said
"You're entering into the realms of black magic there. " I hope he hasn't copyrighted those words :D

cwshosting
05-23-2002, 04:50 PM
Hi,

I have seen this work quite successfully. Although it does fall down if you have some interactive content on the site like a database or helpdesk etc.

Basically create the DNS to be :-

ns1.hostA.com
ns1.hostB.com

You could then simply forward the email from the secondary DNS to a web based email service to ensure delivery when the primary server is down.

Please be aware that sometimes it can swap between primary and secondary for no apparent reason. However, it could just be a 1 second blip with the primary server.

Thanks

Perfecthost
05-23-2002, 06:03 PM
My client's site was MySQL driven. He used something like 5 different databases. It kept pulling connection errors until the dns was straightened out.

Of course, I will add that it is nice to know what the client is trying to do before trying it. I had to find it in a dig and then ask him about it. He was trying to keep it quiet because he thought it would make a host upset to know he was using a second one. That's no problem at all. It just helps to know when dealing with the dns.

Satj2000
05-23-2002, 08:23 PM
Originally posted by rsaylor

Interesting, so on Host A you would need to add Host B in the DNS record on host A for that to work?

So if I said domain.com

DNS Records: Name Servers

NS1.HOSTA. COM
NS2.HOSTA. COM
NS3.HOSTB. COM

Would that work?
You do not need to play with DNS, just a simple javascript redirecter which randomly sends the user to Host B or C

Aussie Bob
05-24-2002, 12:08 AM
Originally posted by Perfecthost
I have to agree with Aussie Bob. We had a reseller try this and it caused dns issues. In digs, it kept pulling up ns4 first, then ns3, ns2, and finally ns1. Then, there was the email issue. The website would pull up on one server and mail on the other...no matter how many times everything was reset. It was a great idea on paper and in his head, but...

Definitely, black magic.:)

-Lamar
;) and you didn't even mention working in databases to the mix etc....

This would probably work with a static html page with external email though. I see no problems with that, just as long as they update the 2 servers at once when they update their site etc..

Aussie Bob
05-24-2002, 12:13 AM
Originally posted by WCSWEB
with regards to the databases I will repeat what Aussie Bob said
"You're entering into the realms of black magic there. " I hope he hasn't copyrighted those words :D
Yes, we do own the copyright for those words. :dgrin:

*sends cease and desist letter to WCSWEB* ;)

But seriously - if anyone can ever one day figure out how to run a dynamically generated site from multiple servers for backup/redundancy without the need for costly clusters/mirrors etc, then that would be a positive for the hosting industry in general, IMO. :)

gnorthey00
05-24-2002, 12:16 AM
I believe this is also available through zoneedit.com.

bababooey
05-24-2002, 12:34 AM
Originally posted by Satj2000

You do not need to play with DNS, just a simple javascript redirecter which randomly sends the user to Host B or C

I guess it depends on what your reasons are for going the multi host route. If it is for fault tolerance, the javascript solution will not work, because the primary server will always need to be up. If you just want to load balance, then this is an acceptable solution -- of course, it may be more desireable to get two accounts with the same web hosting company (they may give you a deal if you talk to them personally).

TotalHst
05-24-2002, 02:37 AM
I'd use a service like mydomain.com, and just setup ip pointing to first host, and backup host. Simple as that, and then if you are scared about mydomain.com going down simple add the first host and ns3 and ns4. Just a suggestion.