Amazon-web-services – Does it make sense to have an Amazon Elastic Load Balancer with just one EC2 instance

amazon ec2amazon-elbamazon-route53amazon-web-services

my question is simple. Does it make sense to have an Amazon Elastic Load Balancer (ELB) with just one EC2 instance?

If I understood right, ELB will switch traffic between EC2 instances. However, I have just one EC2 instance. So, does it make sense?

On the other hand, I´m using Route 53 to route my domain requests domain.com, and www.domain.com to my ELB, and I don´t see how to redirect directly to my EC2 instance. So, do I need an ELB for routing purposes?

Best Answer

Using an Elastic Load Balancer with a single instance can be useful. It can provide your instance with a front-end to cover for a disaster situation.

For example, if you use an auto-scaling group with min=max=1 instance, with an Elastic Load Balancer, then if your instance is terminated or otherwise fails:

  1. auto-scaling will launch a new replacement instance
  2. the new instance will appear behind the load balancer
  3. your user's traffic will flow to the new instance

This will happen automatically: no need to change DNS, no need to manually re-assign an Elastic IP address.

Later on, if you need to add more horsepower to your application, you can simply increase your min/max values in your autoscaling group without needing to change your DNS structure.

Related Topic