Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Auto replicate Ubuntu Server (Linux) on Second Box?

Posted on 2013-01-10
2
Medium Priority
?
486 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
2 Comments
 
LVL 124

Assisted Solution

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

Accepted Solution

by:
junipllc earned 750 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
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…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

971 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