hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : Mirror a VPS across different Hosts
Reply

VPS Hosting Virtual private server discussion and vps hosting solutions. Review VPS hosting providers and offer advice on virtual web hosting solutions. If your service is unavailable, please click here.
Forum Jump

Mirror a VPS across different Hosts

Reply Post New Thread In VPS Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-11-2009, 01:02 PM
netcetra netcetra is offline
Newbie
 
Join Date: Jun 2009
Posts: 11

Mirror a VPS across different Hosts


Can anyone provide a guide on how to mirror an existing VPS to a different host? The ideal setup would be like this:

Linux VPS at Host 1 [Master]
Linux VPS at Host 2 [Slave]

All requests go to the Master, which provides sshd, httpd, ftpd, and mail services. This server is replicated to the Slave VPS on Host 2 and kept synchronized. (rsync?)

If/When Master server/host goes down, all requests automatically get routed to the Slave VPS at Host 2 and when Master VPS at Host 1 is back up, the Slave updates the Master with files/content/db's which have changed and requests start going to the Master VPS again at Host 1.

The slave acts as a backup machine which is also the fail-over system.

I know that some hosts are now offering Mirrored VPS's, however I would like to place them at different hosts, which to me seems a much more secure, reliable and robust mirrored setup.

In all likelyhood I would be doing this on a CentOS Linux box, so instructions for that distro would be most appreciated. Anyone know of a good HOWTO or guide for this?

Thanks to everyone on WHT who provide such excellent stickies as "Secure a VPS" which is probably the first thing any VPS newbie should delve into! You provide a valuable service to the community and you *are* appreciated!!

Reply With Quote


Sponsored Links
  #2  
Old 09-11-2009, 01:21 PM
UNIXy UNIXy is offline
Warp Speed!
 
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,748
You're definitely taking the right approach! VPS failover in the same data center is a plan for disaster but very few realize it. The idea is use DNS failover with database and content replication (slave-master or master-master for the DB). This is the simplest form of data/db syncing.

The actual implementation requires a very long tutorial. Perhaps some day we'll release the failover mechanism we use for free here. Time will tell.

Regards

__________________
|- UNIXY :: Fully Managed Servers and Clusters Since 2006
|- DC POP :: Houston, Los Angeles, Atlanta, & Rotterdam NL
|- Managed Magento Varnish Servers w/ ESI. < 250ms Page Load / TTFB
L- We LOVE helping our clients!

Reply With Quote
  #3  
Old 09-11-2009, 04:01 PM
sej7278 sej7278 is offline
WHT Addict
 
Join Date: Dec 2002
Posts: 151
one way to do it is to have a shared filesystem, such as a san - although single point of failure again then, and you'd only want the san to contain your web/db data, not your os.

database replication can be done at the db layer pretty well/easily.

of course round-robin dns is easy.

you could just setup the second server as secondary mx for mail.

but rsync is not really going to work properly for this kind of thing, as you'll have to do it too often to be useful - like once every few seconds. rsync is brilliant and i use it all the time for backup (and even initial deployment of new servers) but i don't think its quite right here.

failover systems you would use on hardware is different to what you can do with a vps - like a hardware load balancer would be fine for two hardware servers, but not virtual ones. i guess if you control the host nodes it would be easy enough, just use lvm over iscsi to snapshot the /vz/private/<veid>/ directories.

i agree with unixy, failover in the same datacenter isn't hugely useful, its ok, but what happens when power/isp goes down - both your servers are useless.

i'm trying to setup a backup system with my three vps's but don't have a satisfactory implementation yet - but then i'm trying to sync a mailserver vps and a webserver vps to a third vps on another continent, so kind of two-into-one setup.

Reply With Quote
Sponsored Links
  #4  
Old 09-11-2009, 10:26 PM
Nnyan Nnyan is offline
Web Hosting Master
 
Join Date: Feb 2004
Location: Sacramento CA
Posts: 3,056
I do something like that (and if you search these forums there are multiple discussions on this exact topic).

I use DNSMadeEasy for the DNS failover (this will detect when your primary is down and start routing traffic to your backup). Mind you it's not perfect but it's cheap and good enough for me.

You can then mirror your DB's using Master:Master replication (there are more then one way of doing this), use something like Unison (unfortunately doesn't seem to have been upgraded in awhile) for your file replication.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any hosts specialise in accounts used to mirror a website? Max Renn Web Hosting 5 09-28-2006 10:08 PM
Mirror, mirror on the wall... vito Web Hosting Lounge 5 07-05-2005 01:11 AM
Mirror mirror on the wall... psi Dedicated Server 1 07-18-2002 06:22 AM
2 hosts - primary site on 1, backup mirror on 2. How? WebSnail.net Hosting Security and Technology 10 07-13-2001 03:02 PM

Related posts from TheWhir.com
Title Type Date Posted
Solar VPS Becomes Official Mirror for Centos and Ubuntu Web Hosting News 2013-04-16 11:03:34
Living on the edge: why all hosts should offer CDN services Webinars 2012-10-17 15:54:32
Web Host ServerPronto Donates Hosting Resources to CentOS Web Hosting News 2012-07-05 14:06:27
Colocation Provider NYI Launches East Coast Mirror for FreeBSD Foundation Web Hosting News 2012-05-25 10:37:18
Tucows' Elliot Noss on the Mobile Opportunity for Web Hosts Web Hosting News 2012-02-16 16:49:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?