Solved

Auto replicate Ubuntu Server (Linux) on Second Box?

Posted on 2013-01-10
2
468 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 118

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) 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

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Backup Exec Failure 3 49
Uninstallation of MS SQL Express on VUM, SRM and vSphere 6 56
VMware 6.0 3 35
Punctured RAID5 Array on Cisco UCS server. 6 18
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
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…

861 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now