How to optimise cost when architecting for high availability in a single region Multi AZ set up in AWS?

454 Views Asked by At

All,

I designing an application with HA, that will be deployed across multiple AZs in a single region of AWS. Its come to my attention that (even after purchasing a reserved instance), AWS cannot provide a guarantee that an EC2 can be launched in 2nd AZ when primary (AZ1) goes down.

This is unlikely since AWS will have enough capacity provisioned to allow its customers use AZ2 when AZ1 is out of service but nevertheless this is probable (in the event where all customers move from AZ1 to AZ2 and there is a genuine resource constraint in AWS datacenter AZ2).

The only alternative seems to be run an EC2 (or keep it up) in the 2nd AZ (even if not being used) with the aim of using it when AZ1 goes down.

This means we will incur the cost of keeping these EC2s up all the time in AZ2.

Wondering if anyone else has this problem? And overcome this?

1

There are 1 best solutions below

1
Allan Chua On
  1. If you are working on a greenfield project (Newly initiated & no legacy code), consider using serverless architecture. Not only that it enables us to get native HA, Multi AZ and scalability, it also promotes the pay for what you use model compared to the serverful design of EC2 where we have to pay for the VMs even if they are idle on low traffic times.
  2. Consider using auto-scaling groups as it automatically manages the distribution of your instances in different availability zones of a region, to distribute HTTP traffic between these instances, you will have to introduce a combination of application load balancer and target groups.