Registered target is removed when autoscaling occurs in Load Balancer

0

Hi, I'm having an issue with my target group, when an autoscaling happens the registered target is also removed since a new instance is created. How can I replace the new target with the new instance automatically?

Thank you

2개 답변
1

You'll want to attach the Target Group or Classic Load Balancer to the AutoScaling Group: https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html

This way any time AutoScaling launches an instance, it will register the instance to the Load Balancer. Similarly, AutoScaling will deregister the instance from the load balancer before it terminates an instance

AWS
답변함 2년 전
  • Thank you for your response! I have added the target group to the autoscaling group. I tried to simulate manual AutoScaling however this didn't terminate and create a new instance therefore I'm not sure that everything will work as expected. I would like to set up a cloud watch alert so that if there is no target associated an email or SMS is sent. I have selected this "HTTPCode_Target_5XX_Count" as the metric however I get insufficient data, is there another metric that could help me be aware of this, please?

0

I have added the target group to the ASG however I noticed that when the instance gets terminated the ASG creates 2 instances instead of one in the registered targets. To give you more details on my setup: I have one load balancer and if a path is accessed it uses another instance. How can I only limit one target to be created in registered targets?

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠