Auto scaling is a dimension to the elasticity that AWS cloud provides. This gives you the ability of provisioning hundreds and thousands of servers in minimal time without any upfront capital expenditure along with automating the provisioning and capacity management of AWS EC2 instances.
To help you understand, say the application you are running uses EC2 instances and DynamoDB tables. Here, you can set up automatic provisioning and scaling for all the resources involved from the AWS autoscaling clients.
In order to get started with EC2 auto scaling, you must learn about few autoscaling terminologies.
ASG is a logical group of instances, e.g. if you have an application powered by a number of EC2 instances, all these EC2 instances belong to a single ASG. Each ASG is bound by minimum and maximum capacity. It means that the no. of instances running in the ASG will not go beyond the maximum. Hence, you don’t have to worry about cost overruns and the same concept applies to minimum capacity as well.
Desired capacity is what determines the no. of instances that should be running in the ASG at any given time.
Launch template contains the properties of instances to be launched. This is assigned while configuring or creating your ASG. The Launch Template contains the following information –
Amazon EC2 instance type, Amazon Machine Image, Security groups, SSH keys, AWS Identity and Management (IAM) instance profile User Data.
Auto Scaling is required when you want to grow or shrink capacity automatically as the load to your application changes, and not provision at peak capacity all the time for ensuring a smooth application behavior.
In other words, you don’t need to pay for capacity that you aren’t using and also make sure that your application is not sluggish when you don’t have enough capacity. In order to achieve this, we must all go back to the concept of min, max, desired size of ASG.
Depending on your capacity needs, you can auto scale in the following ways –
Here, you simply go to the ASG and update the parameters –
As soon as you enter these values, the ASG will go up to the new state.
You can use scheduled scaling when you have a pattern of increasing traffic load, e.g. 9 to 5 business hours. You can increase or scale up capacity from 9 am and scale down at 5 pm by scheduling the hours.
With Target tracking, you can choose the metric you want to scale on.
For example, your metric could be CPU utilization and your target could be 50. It means, your desired average CPU utilization of the ASG should not exceed more than 50% and hence, more instances would be added to maintain the target if the threshold is exceeded.
You can choose Step scaling if you want to have even finer grain control of how you scale up. You can configure the alarms and the thresholds associated with them manually along with the steps.
For example, if an alarm is thrown at 50% CPU utilization, add 2 more instances,If an alarm is thrown at 60% CPU utilization, add 4 more instances, and so on. The same applies to removing instances as well.
With insisive Cloud, you can seamlessly provision a mix of OnDemand, Spot, and UnUsed RI capacity and also get off the shelf life cycle management of Spot Instances, Stateful spot Instances and much more. There are also quick templates that can help deploy many services like Kakfa, Redis, Webserver using Spot Instances with a single click. With automated management of Spot Instances, you will get savings of up to 80% out of the box.
Getting started with insisive cloud is quick and simple. insisive cloud optimizes cloud infrastructure and saves users up to 60% of Cloud Costs. We will be glad to serve you, just drop an email- email@example.com or give us a missed call on +91 730 365 6936.