AWS Scaling (Reactive VS Proactive VS Predictive)

In terms of Amazon Web Services (AWS), scaling refers to adjusting of computing resources in order to maintain performance of application hosted under AWS. It is simply done by increasing the number of EC2 instances or also by scaling additional resources for other AWS services. With AWS scaling, your application will always have the right resources at the right time.

There are mainly three types of scaling that you can do on AWS namely; Reactive Scaling, Proactive Scaling and Predictive Scaling.

Reactive Scaling (AWS Auto Scaling)

AWS Reactive Scaling, or also called Auto Scaling simply monitors your applications and adjusts its capacity to maintain optimum performance at supposedly minimum cost. It is free of cost and can easily be setup with less hassle. With the AWS Auto Scaling service, you can configure one unified scaling policy per application source. Then, you can add each scalable resource that supports your application to the scaling plan, and define the utilization targets based on which those resources should scale. You can choose to prioritize application availability, cost optimization or a combination of the two. AWS Auto Scaling is simply maintaining the performance of application as per increased usage or traffic or load. It can be highly useful to those applications in which traffic keeps going up and down with no absolute pattern and thus, want to maintain performance with less of a hassle. One can simply set minimum size and maximum size and threshold values, like when to scale up and when to scale down, rest is handled by AWS. It ensures you always have correct number of EC2 instances available to handle load for your application. For example, the following Auto Scaling group has a minimum size of 1 instance, a desired capacity of 2 instances, and a maximum size of 4 instances. The scaling policies that you define adjust the number of instances, within your minimum and maximum number of instances, based on the criteria that you specify like, increase instances when traffic increases to 80% and decrease when traffic decreases to 20%.

Proactive Scaling (Scheduled Scaling)

As it sounds from the name, proactive or scheduled scaling allows you to scale your application resources based on known load that will appear on future. For example, lets say, your application is heavily used on weekends and less used on other days. You might not want to use high number of EC2 instances or use large amount of resources just because for the weekend loads. So, better approach would be using scheduled scaling.

With scheduled scaling, one can set when to increase the capacity or number of EC2 instances and when to decrease. At the specified time, AWS scales with the values for minimum, maximum, and desired size specified by the scaling action. It might be useful for those applications where it is known that when there will be increased load and when there will be decreased.

Predictive Scaling

Predictive Scaling is the newest addition to AWS scaling feature. It uses machine learning to predict usage of application in future and thus changes done accordingly. It collects data from your actual EC2 instance along with billions of other data points and uses well trained machine learning models to predict your expected traffic or EC2 usage from daily to weekly patterns. In order to maintain accuracy, the model needs at least data of a day and then data is re-evaluated every 24 hours.

It might be useful for those applications where traffic pattern hard to understand and still you want to optimize the servers as accurately as possible. It can also be regarded as much accurate version reactive scaling. But unlike, reactive scaling you can see the traffic load up ahead. What I mean by this is, you can easily see the traffic usage on your application for lets, say tomorrow or the day after.

Like other scaling, there is no additional costs involved and currently, it only supports for EC2 instances. But one thing to keep in mind is, it is only suitable for those applications that undergo periodic traffic spikes, so it might not be useful for those application where traffic cycles are not predictable. In simple words, it is not suitable for those application which gets highly random amount of traffic.

Note: A customer does not pay to use the AWS Auto Scaling service, but does pay for the resources it scales and services it uses.