HA for App server - EC2 with EBS volumes


An application server that has no DB has been migrated using AWS MGN with 2 EBS - Data Volumes of total 500 GB (D:\ & E:) other than root EBS. Post migration it doesn't need to be part of ASG as this is not a webserver. But need HA for this App server on another AZ within the same region where the App server is now migrated.

During AWS MGN migration we give one subnet (of one AZ) and create a cutover instance in Launch settings template. Post migration how to setup the HA for this App server with EBS volumes in another AZ As EBS volume cannot be attached to EC2 instance in another AZ We need these 2 EBS volumes replicated in another AZ all time and if one AZ goes down we need to access the App server in another AZ with the latest data . How to achieve this

asked 8 months ago356 views
3 Answers


You're fully correct about the multi-access for EBS tied to one single availability zone.

So, you may want to try to implement disk replication at the OS level (Linux or Windows) with DRBD specifically designed for HA: see https://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device

This is a good lab to see how it gets implemented: https://www.golinuxcloud.com/drbd-tutorial-linux-disk-replication-centos-8/

Also see https://linbit.com/blog/multi-availability-zone-block-replication-using-drbd/

For WIndows, got to https://linbit.com/windrbd-replicated-disk-drives-for-windows/

From https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/#p-intro

DRBD is a software-based, shared-nothing, replicated storage solution mirroring the content of 
block devices (hard disks, partitions, logical volumes, and so on) between hosts.

DRBD mirrors data

1. in real time. Replication occurs continuously while applications modify the data on the device.
2. transparently. Applications need not be aware that the data is stored on multiple hosts.
3. synchronously or asynchronously. With synchronous mirroring, applications are notified 
of write completions after the writes have been carried out on all (connected) hosts. 
With asynchronous mirroring, applications are notified of write completions when the 
writes have completed locally, which usually is before they have propagated to the other hosts.

It will be good to implement it in a test environment first to see if the performances that you achieve cross-AZs match the SLA of your use case.



profile pictureAWS
answered 8 months ago


In addition to the answer about Cluster file systems, such as DRBD you can consider using AWS EFS (Network File System implementation). It gives you access to the same filesystem from different AZs. In that case, you will need to have base AMI with all the settings and APP and EFS mounted to the directory where the application stores data.

You can start here https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html

profile picture
answered 8 months ago

You describe D:\ and E:\ are data volumes, so can it be assumed that you are not going to need to run any binaries directly from these locations? If it really is just a location for storing data then consider using FSx instead of EBS for these volumes.

As it is critically important that the loss of an entire AZ does not impact the running of your application then FSx multi-AZ deployment may be appropriate https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html

profile picture
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions