简体   繁体   中英

AWS ELB how can i make sure new instance is healthy

I have 5 instances in ELB and in Autoscaling Group. I am using ansible rolling display so it shuts down old instance and create new instance.

My Problem is that i have to configure instance after creation and it almost takes 20 mins after creation that i can fully use instance.

I have Health check page /apps/status

WHats happenning is aws joins all new instances and replace old ones but all new instances are in state of OutOFService and it takes further 15 mins to become active.

Is there any way that AWS only replcaes new instance when health check is ok and then start with other instance

Make the Health Checks for your ELB setting to this value in the screenshot. You will save lots of time and the instance will be available more fast. With AWS ELB the options for customization becomes limited and for sure you cannot make the ELB select which instance to choose first so my solution will reduce your latency issue to great extend.

Check this description for AWS ELB your load balancer will automatically perform health checks on your EC2 instances and only route traffic to instances that pass the health check. If an instance fails the health check, it is automatically removed from the load balancer. Customize the health check to meet your specific needs. So health check customization is the only option that open to us when it comes to EC2 instance selection.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM