?
Solved

Auto replicate Ubuntu Server (Linux) on Second Box?

Posted on 2013-01-10
2
Medium Priority
?
482 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 123

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
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…

719 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