CDP:Server Swapping Pattern

From AWS-CloudDesignPattern
Revision as of 00:38, 28 November 2012 by Cdpadmin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Architect

Transferring Servers

Contents

Problem to Be Solved

When there is a server failure, it is followed by attempts at recovery. While you can consider many causes for failures, often there is no problem with the disk. In such a case, you can swap the problem-free disk to another server to recover quickly. Unfortunately, in a datacenter performing such a swap, including the operations to do so, procurement of a substitute server, installation of the disk, and so forth, takes a lot of work.

Explanation of the Cloud Solution/Pattern

With the Amazon Cloud, the servers are virtual servers, enabling use of virtual disks that can be swapped. If there is a failure in a virtual server, you can swap the disk from the virtual server that has experienced the failure to another virtual server, to restore the system. When compared to physical servers, this eliminates procurement of a machine and also movement by a technician, so the recovery will be fast.

Implementation

The Elastic Block Store (EBS) exists independently of the EC2 instance, and can be swapped between EC2 instances, allowing you to start up a substitute EC2 instance, and to swap the EBS there, when a failure has occurred.

  • Attach the EBS to the EC2 instance and store data there as always.
  • When there is a failure in an EC2 instance, start up a virtual server from the same Amazon Machine Image (AMI), and swap, to the new EC2 instance, the EBS used for the data for the failed EC2 instance.
  • Set up the middleware and file system again (by, for example, making symbolic links to the newest data), to restore to the state immediately prior to the failure.
  • You can use monitoring software (Nagios, Zabbix, Heartbeat, or the like) to automate these processes.

Configuration

2XNdewVsgellO3x8-4570E.png

Benefits

  • This lets you to recover to the state immediately prior to the failure of the EC2 instance.
  • You can swap the root disk to rapidly recover the operating system (OS) as well.

Cautions

  • Considering the possibility of a failure of the EBS as well, make sure to make backups by taking snapshots, for example.
  • You can use this together with Floating IP Pattern to swap not only the the EBS, but the static IP address as well.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox