|
|||||||
|
Web Host Backup Question
Here is my scenario, and I'm hoping that some of you really smart IT guys can help me out here.My company has a number of web sites that are hosted with a number of different hosting providers. Of course from time-to-time each provider has a problem and a site goes down (still usually within the SLA). What I would like to do ideally is this: with an entirely different host, keep an up-to-date clone of each of these sites so at any given time, I can change the NameServers and will have minimal downtime. Everything is PHP-based and it hosted on VPS or shared hosting (depending on the site in question). I'm quite sure that everything is on a Linux server using Apache/MySQL (when applicable)/etc. I have considered doing to following, but not sure if this is sound or not:
I have also heard of rsyc, but I'm not sure if that's something I can really utilize or not either. If someone with experience with rsyc can chime in here, that would be cool. This tool seems like it could save a lot of time/bandwidth. Hopefully this makes sense. I appreciate any kind of constructive feedback that I can get. Thank you in advance. |
| 09-06-2012, 02:15 PM | |
|
|
|
rsync would be much better than gzip, and you should be able to use it for the files at least. Mirroring the database is a little harder depending how the hosts configure things.
Do you have shell access to all servers? http://www.webhostingtalk.com/sho...p?t=524788 Many webhosts provide an automatic failover service that would likely work better. |
|
As for SSL, we buy those through a third party, so this should not be an issue. PM me if you have any questions regarding document imaging.
|
||||
|
https://my.bluehost.com/cgi/help/180 |
|
|
|
|
|
The only real way to do what you want is a load balancer with a mirror site. Most load balancers use a number of criteria, including if the server is responding, to forward web requests. I find it hard to believe that any "real" hosts have enough downtime to cause you any pain. Is this being hosted out of someone's garage? If you want 100% uptime with a 100% SLA your only real choice is Akamai. They are super expensive. I manage about 20 web sites hosted through them.
Yes, the best way to keep the website static files synchronized is rsync. It is not hard to use. That is what I use to copy the files from the publishing hub to the origin server. Since you are using PHP (Drupal?) there really is no good way to have redundancy. I am currently evaluating Drupal and from what I see, it is not an Enterprise content management system. More for a small site, personal site, or a site that doesn't require high availability. Akamai and most content distribution networks only are good for static content. Using an active content management system like Drupal or Wordpress or even Tomcat applications makes it quite a bit harder to build redundancy into your systems. Drupal has a plugin that exports static pages. So depending on what is on the page, you may or may not be able to make it stand-alone. What you propose for MySQL would not create a real-time usable database copy. Look into how to mirror MySQL. E finita la cuccagna
Politics may not be the oldest profession but the results are the same. |
|
|
||||
|
Here is an rsync example. This one uses certificates so that no password needs to be entered.
rsync man page - http://linux.die.net/man/1/rsync #!/bin/bash #Commands Variables RSYNCMD='/usr/bin/rsync' #RSYNCOPTS="-vrlptuHSPO --stats" #RSYNCOPTS="-vrluHSPO --stats" RSYNCOPTS="-pvrc --stats" CHMOD="--chmod=u+rwX,g+rwX,o+rX,o-w" HOME=`echo $HOME` # v - verbose, u - update, H - Hard links, S - sparse files # p - permissions, l - keep symlinks, t - time stamp, # r - recursive # a == archive == rlptgoD # can't use 'a' because it includes goD, group, owner, Devices RSYNCUSER='wwwweb' TARGETMACHINE='x.x.x.x' RSA_FILE="id_rsa-origin-ws-01" TARGETDIR="/appdata/www/`whoami`" SOURCE=`hostname`.domain.local SOURCEDIR="/appdata/www/`whoami`" LOGFILE="$HOME/bin/`whoami`-rsync.`date '+%Y%m%d-%H%M%S'`" MAILTO="admin@yourdomain.com" echo "rsyn log: rsync.`whoami`" > $LOGFILE echo "rsyncing from $SOURCE $SOURCEDIR to $TARGETMACHINE $TARGETDIR" >> $LOGFILE echo "" >> $LOGFILE # Rsynching recursive, verbose, update, Hardlinks, Sparse files, exclude lost+found dir, collect stats, use ssh, $RSYNCMD $RSYNCOPTS $CHMOD -e "ssh -i $HOME/bin/$RSA_FILE" $SOURCEDIR/ wwwweb@$TARGETMACHINE:$TARGETDIR >> $LOGFILE #/usr/bin/mailx -s "rsync log: rsync website report `date '+%B %d, %Y'`" $MAILTO < $LOGFILE |
|
![]() I used to work for a now defunk e-retailor similar to buy.com and we had web servers in house and a colocation. I believe they used an F5 box for load balancing/failover but I know their hardware is $$$. That being said it looks like there is an open source project for this type of thing, http://www.apsis.ch/pound/. Might be worth checking out.
|
||
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Who do you use for web hosting? | chewspam | Tech Support | 22 | 07-20-2012 05:11 AM |
| What lens should I use, t3i battery life, website to host pictures | APhamX | Tech Support | 36 | 09-26-2011 09:33 AM |
| Cox Communication in CA is removing web hosting? | stephan949 | Tech Support | 3 | 09-21-2011 11:39 PM |
| Hosts file question -- Answered!! | callpocket | Tech Support | 9 | 03-03-2011 02:41 PM |
| Cheap web hosting options for a Wordpress blog? | trancer86 | Tech Support | 9 | 02-02-2011 07:27 AM |