DEV Community

Aadit Unni
Aadit Unni

Posted on

Deploy a Highly Available Group of EC2 Instances Using Terraform

[92/100] #100DaysOfCloud Today, I deployed a highly available group of EC2 Instances with load balancer and autoscaling group using Terraform.

High Availability:
High availability (HA) refers to the continuous availability of your application and data regardless of any downtime. For example, if your web application is available 24/7 to serve your customers or clients without any downtime, it’s called a highly available web app.

High Scalability:
High Scalability refers to the ability of an application or a system to handle a huge volume of workload or expand in response to an increased demand for an application. For example, suppose you have an online shopping website running on a fleet of ten web servers and you plan for a discount sale. This sale will be going to increase the workload on your servers. So you anticipate the network traffic and you add 5 more servers to host your shopping website and avoid any downtime. Which means you have scaled your infrastructure. This ability of your application to scale is called high scalability. So the more scalable your application the more available it’s. So high scalability and high availability are correlated but not the same.

Terraform:
Terraform is an infrastructure as a code (IaC) tool. We can provision the cloud infrastructure using Terraform. It’s similar to AWS cloud-formation but it can work with almost any cloud platform. Usually, if you want to create some cloud infrastructure for example an EC2, you will go to the AWS console using your browser and then click on the launch instance button. This sounds easy and quick, but at some point, as the infrastructure gets larger and larger, it becomes difficult and tedious to manage such a large infrastructure manually by using only the AWS console. To solve this problem we can use Terraform.

You can try do it by yourself by following the steps from the link below: GitHub

Top comments (0)