figures
Blog

New – EC2 Auto Scaling Groups With Multiple Instance Types & Purchase Options

Admin Globaldots
19.11.2018
image 4 Min read

If you’re using AWS, you can now create Auto Scaling Groups that grow and shrink in response to changing conditions, while also making use of the most economical combination of EC2 instance types and pricing models. You have full control of the instance types that will be used to build your group, along with the ability to control the mix of On-Demand and Spot. You can also update your existing Auto Scaling Groups to take advantage of this new feature.

The Auto Scaling Groups that you create are optimized anew each time a scale-out or scale-in event takes place, always seeking the lowest overall cost while meeting the other requirements set by your configuration. You can modify the configuration as newer instance types become available, allowing you to create a group that evolves in step with EC2.

Creating an Auto Scaling Group

You can create an Auto Scaling Group from the EC2 Console, CLI, or API. The first step is to make sure that you have a suitable Launch Template (it should not specify the use of Spot Instances). Here’s an example:

Then you navigate to my Auto Scaling Groups and click Create Auto Scaling group:

Click Launch Template, select my ProdWebServer template, and click Next Step to proceed:

Name your group and select Combine purchase models and instances to unlock the new functionality:

Now select the instance types that you want to use. The list is prioritized: instances at the top of the list will be used in preference to those lower down when On-Demand instances are launched. For example, if your will run fine on M4 or M5 instances with 2 or more vCPUs:

You can accept the default settings for my group’s composition or you can set them myself by unchecking Use default:

Here’s what you can do:

Maximum Spot Price – Sets the maximum Spot price that you want to pay. The default setting caps this bid at the On-Demand price.

Spot Allocation Strategy – Control the amount of per-AZ diversity for the Spot Instances. A larger number adds some flexibility at times when a particular instance type is in high demand within an AZ.

Optional On-Demand Base – Controls how much of the initial capacity is made up of On-Demand Instances. Keeping this set to 0 indicates that you prefer to launch On-Demand Instances as a percentage of the total group capacity that is running at any given time.

On-Demand Percentage Above Base – Controls the percentage of the add-on to the initial group that is made up of On-Demand Instances versus the percentage that is made up of Spot Instances.

As you can see, you have full control over how your group is built. You leave them all as-is, set my group to start with 4 instances, choose my VPC subnets, and click Next to set up your scaling policies, as usual:

You can disable scale-in if you want (it’s disabled here for demo purposes):

You then click past the Configure Notifications, and indicate that you want to tag my group and the EC2 instances in it:

You can review your settings and click Create Auto Scaling Group to move ahead:

The initial group of four instances is ready to go within minutes:

You can filter by tag in the EC2 Console and display the Lifecycle column to see the mix of On-Demand and Spot Instances:

You can modify your Auto Scaling Group, reducing the On-Demand Percentage to 20% and doubling the Desired Capacity (this is a demo-mode way of showing what happens when the group scales out):

The changes take effect within minutes; new Spot Instances are launched, some of the existing On-Demand Instances are terminated, and the composition of the group reflects the new settings:

Here are a couple of things to keep in mind when you start to use this cool new feature:

Reserved Instances – AWS plans to add support for the preferential use of Reserved Instances in the near future. Today, if you own Reserved Instances, specify their instance types as early as possible in the list we showed you earlier. Your discounts will apply to any On-Demand instances that match available Reserved Instances.

Weight – All instance types have the same weight; we plan to give you the ability to specify weights in the near future. This will allow you to specify custom capacity units for each instance using either memory or vCPUs, and to specify the overall desired capacity in the same units.

Cost – The feature itself is available to you at no charge. If you switch part or all of your Auto Scaling Groups over to Spot Instances, you may be able to save up to 90% when compared to On-Demand Instances.

ECS and EKS – If you are running Amazon ECS or Amazon Elastic Container Service for Kubernetes on a cluster that makes use of an Auto Scaling Group, you can update the group to make use of multiple instance types and purchase options.

This feature is available now and you can start using today in all commercial AWS regions!

Comments

0 comments

There’s more to see

slider item
Your Innovation Feed

eBook: Don’t Fortify, Amplify: The New Cloud Security Stack

Steven Puddephatt 25.11.21

2021’s Security leaders deal with everything from cloud-native insider threats to staying one step ahead of the unknown. While the cloud is made to amplify and speed up core business processes, the pressure to fortify cloud-borne assets from possible cyber threats painfully slows things down.  GlobalDots harnessed its 17-year cloud security experience to rethink cloud […]

Read more
slider item
Identity & Access Management (IAM)

How IT can Breeze through Onboardings without Additional Hirings

Dror Arie

Which IT Nuisance Would You Automate First? Employee onboarding is one of the heaviest, most complex operations on a company’s IT. This is especially true in fast-growing companies that may see multiple onboardings per day. And, of course, the wider a company’s software tools array, the more accounts to create and permissions to manage. In […]

Read more
slider item
Cloud Workload Protection

GlobalDots Partners with CWP Innovator Lacework

Li-Or Amir 23.11.21

In its constant endeavor to enrich its cloud security offering with the latest innovation, GlobalDots has recently introduced security unicorn Lacework to its vendor portfolio. Founded in 2015, Lacework offers a cloud security monitoring platform which brings together some of today’s top needs: Workload protection, container & K8s security, compliance monitoring. Last weekend (Nov. 18th, […]

Read more

Unlock Your Cloud Potential

Schedule a call with our experts. Discover new technology and get recommendations to improve your performance.
Contact us
figure figure figure figure figure