Auto Scaling Terminate Unhealthy Instance
First, note the state of the instance in Amazon EC2 Auto Scaling:
- Sign in to the Amazon EC2 console. In the navigation pane under Auto Scaling, choose Auto Scaling Groups, and then select the instance's group.
- Choose the Instances view and note the health state of the instance.
Health Check Grace Period
Amazon EC2 Auto Scaling doesn't terminate an instance that came into service based on EC2 status checks and ELB health checks until the health check grace period expires. To find the grace period length:
- On the Amazon EC2 console
- Choose the Details view and note the Health Check Grace Period length.
Suspended Processes
The suspension of processes such as HealthCheck, ReplaceUnhealthy, or Terminate affects Amazon EC2 Auto Scaling's capability to detect, replace, or terminate unhealthy instances:
- Under Auto Scaling in the navigation pane of the Amazon EC2 console navigation pane, choose Auto Scaling Groups, and then select the instance's group.
- Choose the Details view.
- Choose Edit and remove any of the following processes from Suspended Processes if they are present: HealthCheck, ReplaceUnhealthy, or Terminate.
- Choose Save to resume the processes.
Instance State in Amazon EC2 Console
Amazon EC2 Auto Scaling does not immediately terminate instances with an Impaired status. Instead, Amazon EC2 Auto Scaling waits a few minutes for the instance to recover. To check if an instance is impaired:
- On the Amazon EC2 console navigation pane, under Instances, choose Instances, and then select the instance.
- Choose the Status Checks view and note if the instance's status is Impaired.
Amazon EC2 Auto Scaling might also delay or not terminate instances that fail to report data for status checks. This usually happens when there is insufficient data for the status check metrics in Amazon CloudWatch. To terminate these instances manually:
- On the Amazon EC2 console navigation pane, under Instances, choose Instances, and then select the instance.
- Choose the Monitoring view and note the status of the instance.
- If the status is Insufficient Data, select the instance again, choose the Actions menu, choose Instance State, and then choose Terminate.
Instance State in Auto Scaling Group
Amazon EC2 Auto Scaling does not perform health checks on instances in the Standby state. To set Standby instances back to the InService state:
- On the Amazon EC2 console navigation pane, under Auto Scaling Groups, select the instance's group, and then choose the Instances view.
- Choose the filter menu Any Lifecycle State, and then select Standby.
- To resume health checks, open the context (right-click) menu for an instance, and then choose Set to InService, which exits the Standby state.
Amazon EC2 Auto Scaling waits to terminate an instance if it is waiting for a lifecycle hook to complete. To find the lifecycle status and complete the lifecycle hook:
- On the Amazon EC2 console navigation pane, under Auto Scaling, choose Auto Scaling Groups, and then select the instance's group.
- Choose the Instances view and note the Lifecycle status for the instance.
- If the status is terminating:wait, you can check the heartbeat timeout and then run completing-lifecycle-action to complete the lifecycle hook.
If Amazon EC2 Auto Scaling is waiting for an ELB connection draining period to complete, it waits to terminate the instance:
- On the Amazon EC2 console navigation pane, under Auto Scaling, choose Auto Scaling Groups, and then select the instance's group:
- Choose the Instances view and confirm that the instance's Lifecycle is terminating.
- Choose the Activity History view.
- For Filter, select Waiting for ELB connection draining to confirm if the group is waiting to terminate the instance.
ELB Health Checks
ELB settings can affect health checks and instance replacements. Note the instance's status in on the ELB console:
- On the Amazon EC2 console navigation pane, under Load Balancing, choose Load Balancers, and then select the load balancer to which the instance is registered.
- Choose the Instances view and note the instance's status and description.
Amazon EC2 Auto Scaling doesn't use the results of ELB health checks to determinate an instance's health status when the group's health check configuration is set to EC2. As a result, Amazon EC2 Auto Scaling doesn't terminate instances that fail ELB health checks. If an instance's status is OutofService on the ELB console, but the instance's status is Healthy on the Amazon EC2 Auto Scaling console, confirm that the health check type is set to ELB:
- On the Amazon EC2 console navigation pane, under Auto Scaling, choose Auto Scaling Groups, and then select the instance's group.
- Choose the Details view and note the Health Check Type.
- Choose Edit and select ELB for Health Check Type, and then choose Save.
If the group's health check type is already ELB and the instance's status on the ELB console is OutofService, use the status description that you noted earlier to determine further steps:
- Instance registration is still in progress: wait for load balancer to complete instance registration and for the instance to enter the InService state.
- Instance is in the Amazon EC2 Availability Zone for which LoadBalancer is not configured to route traffic to: edit the subnets of the Auto Scaling group or load balancer to be sure they are same as the instance's subnets.
- Instance hasn't passed the configured HealthyThreshold number of health checks consecutively: wait for ELB to complete health checks and the instance to enter the InService state.
相關推薦
Auto Scaling Terminate Unhealthy Instance
First, note the state of the instance in Amazon EC2 Auto Scaling: Sign in to the Amazon EC2 console. In the navigation
Why did Auto Scaling Terminate an Instance
Use the instance’s description in the Activity History view to determine further steps. Before proceeding, find the description and
Automatically Attach a Second ENI to an Instance Launched Through Auto Scaling
import boto3 import botocore from datetime import datetime ec2_client = boto3.client('ec2') asg_client = boto3.client('autoscaling') def lamb
Reboot an Auto Scaling Group Instance
Put the instance into the Standby state To reboot an instance in an Auto Scaling group, you can put the instance into the Standby st
彈性伸縮Auto Scaling產品全面升級,輕松應對業務負載變化
冗余 穩定性 阿裏 server 反饋 公鑰 一段時間 采集 總數 摘要:?彈性伸縮是阿裏雲上非常受歡迎的一個雲服務編排產品,它能夠根據用戶的策略定義和業務需求變化,動態調整彈性計算資源,在有效支撐業務負載變化的同時保持最合理經濟的基礎設施費用開支。基於廣大用戶的反饋和建議
Ask HN: How fast is an AWS auto scaling group?
I have been struggling to find an answer to this simple question. What is the rate at which new instances can be created in an autoscaling group?Let's say
Auto Scaling Production Services on Titus
Auto Scaling Production Services on TitusOver the past three years, Netflix has been investing in container technology. A large part of this investment has
Scryer: Netflix’s Predictive Auto Scaling Engine
Scryer: Netflix’s Predictive Auto Scaling EngineTo deliver the best possible experience to Netflix customers around the world, it is critical for us to mai
Auto Scaling Troubleshooting
Based on the scaling issues you're seeing, perform the following checks on your Amazon EC2 Auto Scaling configurations: My Amazon E
Troubleshoot Auto Scaling Using CodeDeploy and CloudWatch
Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So
Use Auto Scaling to Improve the Fault Tolerance of an Application Behind a Load Balancer
Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So
Fleet Management Made Easy with Auto Scaling
If your application runs on Amazon EC2 instances, then you have what’s referred to as a ‘fleet’. This is true even if your fleet is just a single
Auto Scaling Group Rolling Updates
SuspendProcesses During a rolling update, you must suspend Auto Scaling processes to avoid making unexpected changes to the group. If an unexpe
Auto Scaling in Amazon EMR
Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So
Auto Scaling Delay Termination
Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So
API calls to Auto Scaling are throttled
To prevent or mitigate “Rate Exceeded” errors and throttling, try these solutions: Validate “describe” calls Excessive “d
On-demand, Auto-scaling Relational Database
You are running a news website using an Aurora Serverless database with a storage size of 80 GB. While there is light load on the site most of th
AWS Marketplace: WordPress powered by AMIMOTO (Auto Scaling)
AWS Marketplace is hiring! Amazon Web Services (AWS) is a dynamic, growing business unit within Am
Amazon EC2 Auto Scaling FAQs
Q: What are the benefits of using Amazon EC2 Auto Scaling? Amazon EC2 Auto Scaling helps to maintain your Amazon EC2 instance avai
Amazon EC2 Auto Scaling Features
Predictive Scaling predicts future traffic, including regularly-occurring spikes, and provisions the right number of EC2 instances in advance of