Autoscaling is a process of dynamically allocating the resources required by an application to improve performance and meet service level agreements (SLAs).
It’s an automated process that helps us in managing resources automatically. It’s also an elastic process; more resources are provisioned as load increases the system but as demands slackens the resources are deallocated.
Types of Autoscaling
- Vertical Scaling/ Scaling Up
- Horizontal Scaling/ Scaling Out
Vertical Scaling/ Scaling Up
In vertical scaling , we redeploy the solution using different hardware. In this scaling system temporarily becomes unavailable while it is being redeployed. It may be possible to keep the original system running while the new hardware is provisioned and brought online.
Horizontal Scaling/ Scaling Out
In horizontal scaling, we deploy the solution on additional resources. The system can continue running without any interruption while these resources are provisioned. When the provisioning process is complete, copies of the elements that comprise the system can be deployed on these additional resources and made available. If demand drops, the additional resources can be reclaimed after the elements using them have been shut down cleanly.
Steps require to implement autoscaling strategy
- Instrumentation at the application level to capture key performance and scaling factors such as response times, queue lengths
- Monitoring components that can observe these performance and scaling factors.
- Decision-making logic that can evaluate the monitored scaling factors against predefined system thresholds and make decisions regarding whether to scale or not
- Execution components that are responsible for carrying out tasks associated with scaling the system.
- Testing and validation of the autoscaling strategy to ensure that it functions as expected.
Following are some best practices that should be keep in mind while implementing autoscaling strategy:
- Scale up and down symmetrically
- Scale up quickly and scaling down slowly