135k views
3 votes
A user is planning to launch three EC2 instances behind a single Elastic Load Balancer. The deployment should be highly available. What is the best way to achieve this?

1) Configure the EC2 instances in an Auto Scaling group
2) Use a Network Load Balancer instead of an Elastic Load Balancer
3) Use a Classic Load Balancer instead of an Elastic Load Balancer
4) Configure the EC2 instances in a Placement Group

1 Answer

7 votes

Final answer:

The best way to achieve high availability for three EC2 instances behind an Elastic Load Balancer is to configure them in an Auto Scaling group, enabling automatic replacement and scaling.

Step-by-step explanation:

To achieve high availability for three EC2 instances behind a single Elastic Load Balancer, the best approach is to configure the EC2 instances in an Auto Scaling group. This ensures that if an instance fails, the Auto Scaling group can launch new instances to replace it and maintain the desired capacity. This setup also provides the flexibility to scale in or out automatically based on traffic demand. Both Network Load Balancer and Classic Load Balancer are types of Elastic Load Balancer, but merely changing types doesn't inherently affect availability. Placement Groups are used for controlling the placement strategy of instances within the same region, which is different from the concept of scaling and self-healing that Auto Scaling provides.

User Nook
by
8.6k points