Load Balancer Target Group

0

Hi AWS, I have a question i.e.

Does adding new target group with healthy instances and removing the old target group from the AWS load balancer in production makes any negative impacts?

Services involved: Launch template Load balancer Target groups Auto scaling group

This is the complete process:

Step1: We create stagging servers(which were spinned from the previous ami), push our jar, wars into the tomcat.

Step2: Creating images from that stagging servers. Attach it to the launch template. And set it as default version.

Step3: Now we drain one server from the target group, after successful draining we delete that server so new one spins. Until the new one becomes healthy we don't drain the second server.

Step4:

We remove second instance after checking the new spin instance become healthy and after successful draining of the second one we remove it and new will spin. Because of desired capacity is set to 2.

Having said that I want to automate this process as currently we are doing it manually and it is error prone and very time consuming. How can we effectively automate this process with the least cost possible in a more reliable and faster development mode.

Please help.

1 Answer
0

Thank you for the details.

As you are using Auto Scaling Group, I would recommend taking a look at instance refresh feature, which pretty much automates all the mentioned manual process: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html

For instance, set the minimum healthy percentage to 100 percent, ASG will ensure there's at least one healthy instance and gradually replace all the instances to use the new launch template. Please take a look, have an experiment in the staging environment, and see if this fits your requirement.

AWS
weidi
answered 7 months ago
profile picture
EXPERT
Kallu
reviewed 15 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions