Jump to content

If host #1 fails, serve from host #2 (emergency only)


sKunKbad

Recommended Posts

I browsed around a little and have seen some solutions, but wondering what the appropriate way to handle a hosting related issue is. The problem is that the host that we have is not from the land of unicorns and rainbows. I really do like the host, and think they are as good as can be expected, but everyone once in a while the site will go down for a few hours because of X, Y, or Z. This is just a glorified or "premium" shared hosting.

 

What I was thinking about doing was to use rsync on host #2 to pull in file changes from host #1 a few times a day. I would also use mysqldump and recreate the database on host #2 a few times a day. If there was a big problem with host #1, we could switch nameservers manually and perhaps the experience would be better than not doing any of this.

 

Does this idea blow? How would you do it?

Link to comment
Share on other sites

If site A goes down people are connecting to site A and it can never go to site B unless you manually set dns and wait it out.

 

I would say dns failover or round robin.

It will need a monitoring service that can determine which dns to send traffic to and a lower TTL

 

The right way would be to use a datacenter and have the same LAN, use HTTP load balancing to handle server failures

 

http://www.haproxy.org/

https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-http-load-balancing-on-an-ubuntu-vps

 

If you ever decided using a datacenter, check out mesosphere

Link to comment
Share on other sites

  • 4 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.