AWS System Design for High Availability (Part 1)

Part 1, Part 2

Introduction

We will divide this topic as two parts. The first part we will talk about what high availability (HA) is and Elastic Load Balancing (ELB). We may have a brief concept about HA and ELB from previous articles, but this time we will go through it a little bit details.

What is High Availability (HA)?

High availability (HA) is about ensuring that your application’s down time is minimized as much as possible without human intervention.

For best practice, we should avoid single points of failure. All the things we assume to be failed, and design backwards.

For instance, we should create a standby database server and replicate the data. Then it will have resilience one the master database is down.

Also, there are two requirements when talking about HA.

  1. Recovery Time Objective (RTO). It measures the recovery time of the system.
  2. Recovery Point Objective (RPO). It measures how much data we afford to lose.

Also, when we determine how good of the HA design, we think of below 3 factors:

  1. Fault tolerance. It measures the built-in redundancy of an application’s components.
  2. Recoverability. It measures the procedures, process and policies about restoring service after a catastrophic event.
  3. Scalability. It measures the ability of an application to accommodate growth without changing design.

To really implement HA is very difficult. However, that is also the reason we use AWS cloud, or any public cloud.

In traditional, on-premises HA is very expensive and is suitable only for absolutely mission-critical applications.

On the other hand, in AWS we can easily have multiple servers, isolate datacenter and fault-tolerant services.

Elastic Load Balancing (ELB)

As mentioned before, ELB is a managed load balancing server to distribute incoming application traffic across multiple EC2.

In addition, it can detect unhealth instances. It works for both public or internal facing.

By enabling connection draining, it makes ELB to stop sending new requests to back-end instance if instances are unhealthy. Thus, we can perform maintenance without affecting our end users.

In fact, we can use multiple load balancers to access web application with different settings.

HA with ELB

As discussed above, we can have internet-facing and internal-facing ELB. In most cases, we do not only need either one, but need both of them just like above figure shown.

For this design, internet-facing ELB is located on public subnet and distribute traffic to web servers in two AZs. On the other hand, internal ELB is located on private subnet and distribute traffic to app servers.

Conclusion

To conclude, we learnt how to define a good HA system by fault tolerance, recoverability and scalability. Also, we need to think when to use public and internal facing ELB. It provides HA due to the health check property.

Leave a Reply