Solved

Auto replicate Ubuntu Server (Linux) on Second Box?

Posted on 2013-01-10
2
481 Views
Last Modified: 2013-02-14
My org. is going to launch a public facing Drupal site running on Ubuntu Server)

As part of a load balancing and backup strategy, one of the options we want to explore is having the (A) server auto replicate constantly on (B) server.

So if (A) crashes, (B) immediately takes over.

So...what's the best practice for this?

Note:  1) I'm running all this virtually in a VMare environment and 2) the MySQL is on it's own server.
0
Comment
Question by:sandshakimi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 121

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Andrew Hancock (VMware vExpert / EE MVE^2) earned 250 total points
ID: 38762914
0
 
LVL 12

Accepted Solution

by:
junipllc earned 250 total points
ID: 38763359
There is a tag in this question for Drupal, so Drupal dude reporting in.

There are a number of ways to do this for Drupal, and it depends on which version you are using, and what features the site has. Since you are on a local network and not doing this across the WAN it's a bit easier.

Off the top of my head, you'll need:
 - a shared file system (GlusterFS, NFS, CIFS)
 - either DRBD/Heartbeat or a reverse proxy / load balancing server (Apache works for this)
 - depending on how you implement this (two live servers vs. one live and one hot standby) you may need sticky session support (easy in Apache)
 - I would always replicate the database regardless of whether you are using the same MySQL box for everything
 - no single point of failure.

Are you also concerned about scaling? If so, certain approaches are better than others, and this one may be the way to go:

In your situation (with the limited knowledge I have so far) I'd use two Apache reverse proxies with load balancing and sticky sessions (mod_proxy, mod_proxy_http, mod_proxy_balancer), placed into an HA group (DRBD/Heartbeat is good for this). You'll have a "floating" IP address that moves between the proxy servers should one of them crash.

Then I'd have server A and server B set up behind the proxy as the "members" of the load balancer. You can add additional servers at will (server C? server D? server Z?).

The shared file system will keep the machines in sync since there is only one place where the data lives; however, this introduces a possible single point of failure. You may also want to consider rsync (good for smaller sites) or unison if you want to keep duplicate copies of the files on each server. I believe Gluster will take care of replication automatically, but I have limited experience with it.

The database should be replicated to at least one other machine for backup, or for scalability (using one server for reads and another for writes). Back up your database. Often.

This attains the goal of backup (in the hosting sense) and load balancing. If server A were to crash, Apache will automatically remove it from the group of active servers, and server B would take over the additional traffic. Same goes with 3, 4, or 20 servers.

Again, there are other ways to do it, and there may be a better, more up-to-date way, but I know this is tried-and-true for Drupal and Ubuntu.

Cheers!

Mike
0

Featured Post

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question