DEV Community

Saloni Singh
Saloni Singh

Posted on

Learning AWS Day by Day — Day 13 — AutoScaling — Part 2

Image description

Exploring AWS !!

Day 13:

Autoscaling — Part 2:

Instance Termination:

When scaled in then check if instance is available in multiple availability zones, if Yes then select availability zone with most instances and if No, then select instances with oldest launch configurations. Further, check if there are multiple instances using oldest launch configurations, if No, Terminate the instance. If Yes, then in that case select instances next to closest billing hour. If there are multiple instances closest to next billing hour, then select random instance and terminate the instance.

Instance Termination Policies (other than default):

Oldest Instance
Newest Instance
Oldest Launch Configuration
Closest to next instance hour

Instance protection does not terminate an instance during a scale in event. It can be enabled at autoscaling group or individual instance level.

Autoscaling pricing:
No additional fees
Underlying instance are charged hourly

ELB and Autoscaling Integration:
Autoscaling: adds and removes capacity as per requirement.
Load Balancer: Distributes incoming traffic evenly across all EC2 instances.
Placing ELB in front of autoscaling makes sure that all the incoming traffic are distributed, dynamically changing number of EC2 instances.
ELB is point of contact between clients and backend EC2 instances.
Load Balancers automatically registers instances in group.

Health Checks:
EC2 instances only: EC2 status checks are configured.
EC2 and ELB health checks: An instance is considered unhealthy if either of the health checks fail.

Top comments (0)