Home › Forums › AWS › AWS Certified Solutions Architect Associate › Elastics Load Balancing concept clarity
Tagged: ELB
-
Elastics Load Balancing concept clarity
Jon-Bonso updated 3 years, 11 months ago 2 Members · 4 Posts -
A suite of web applications is hosted in an Auto Scaling group of EC2 instances across three Availability Zones and is configured with default settings. There is an Application Load Balancer that forwards the request to the respective target group on the URL path. The scale-in policy has been triggered due to the low number of incoming traffic to the application.
Which EC2 instance will be the first one to be terminated by your Auto Scaling group?
The EC2 instance launched from the oldest launch configuration- Correct answer
The EC2 instance which has been running for the longest time- I chose this ans
The explanations that the EC2 instance which is close to the closest to the billing cycle should be terminated. To me it should be an instance which has been running for the longest time.
Because the instance running with the longest time will have the oldest launch configuration.
Please explain why the first answer is correct
-
Hi Ishan,
Thank you for posting your question. I understand your point here. You are saying that because the EC2 instance has been running for the longest time, then most likely, it would also have the oldest launch configuration. Yes, this is possible but not all the time.
Take note that a launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances. If you just launched an EC2 instance manually, then it is possible that it doesn’t have an associated launch configuration. You can also manually attach new EC2 instances in your Auto Scaling group. These newly attached EC2 instances can adopt the launch configuration of the Auto Scaling group:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html
Therefore, the EC2 instance which has been running for the longest time in the Auto Scaling group, doesn’t always have the oldest launch configuration too. It depends on various factors, which is why the official AWS Documentation said that the primary attribute for terminating the EC2 instances for scale-in is the oldest launch configuration and not the longest-running instance.
Amazon EC2 Auto Scaling also supports the custom termination policies, such as OldestInstance, which terminates the oldest instance in the group. I believe, this is what you are referring to here. For more information, please visit:
Cheers,
Jon Bonso @ Tutorials Dojo
-
You’re welcome Ishan! The Tutorials Dojo team is always here to help!
The discussion ‘Elastics Load Balancing concept clarity’ is closed to new replies.