Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Amazon auto scaling with mixed types of instance

If I have 2 different types of instances say micro and large in my scaling group. Then how does auto scaling work if I have configured min-machines as 2 and max as 10 ? Does it create 5 instance each of micro and large when fully scaled out ?

like image 659
user1259574 Avatar asked Jun 02 '15 19:06

user1259574


People also ask

Can an Auto Scaling group have multiple instance types?

You first specify the common configuration parameters in a launch template, and choose it when you create an Auto Scaling group. When you configure the Auto Scaling group, you can: Choose one or more instance types for the group (optionally overriding the instance type that is specified by the launch template).

What kind of EC2 instances can Auto Scaling use?

Yes. You can provision and automatically scale EC2 capacity across different EC2 instance types, Availability Zones, and On-Demand, RIs and Spot purchase options in a single Auto Scaling Group.

How many EC2 instances can you have in an Auto Scaling group?

For example, the following Auto Scaling group has a minimum size of one instance, a desired capacity of two instances, and a maximum size of four instances.

Which scaling options are supported by Amazon Auto Scaling?

Dynamic scaling responds to changing demand and predictive scaling automatically schedules the right number of EC2 instances based on predicted demand. Dynamic scaling and predictive scaling can be used together to scale faster.


2 Answers

The Auto Scaling Group will always create new instances according to the Launch Configuration associated with the group. I'm pretty sure that it will scale down by first terminating instances that don't match the current Launch Configuration of the group.

If you want to run an application on a cluster of servers that is made up of two different instance types you can do it by creating two Launch Configurations with two Auto Scaling Groups. If your application requires instances to be registered with an Elastic Load Balancer, you can configure both Auto Scaling Groups to register their instances with the same ELB. This way you can scale the different instance types independently of each other.

like image 196
David Fevre Avatar answered Oct 20 '22 15:10

David Fevre


Only one type of instance can be on a Launch Configuration. And only one Launch Configuration can be in an Auto Scaling Group. In that way, if you have selected micro instance in the Launch Config, you can see only that type in your Auto Scaling Group. And in that auto scaling group, you must have defined a AutoScalingPolicy which can be 'add 1 instance' or 'add n instance' or 'add n% instance'. Based on that value it will create instance.

For example, if you selected min as 2 and max as 10, and scaling policy as add 1 instance. Initially, there would be 2 instance created and running as part of Auto policy, and every time the threshold exceeds the policy, 1 instance will be created up to 10. No more instances will be created if the threshold goes up after having 10 instances.

like image 45
StackOverFlow User Avatar answered Oct 20 '22 15:10

StackOverFlow User