Whizlabs on 19 Dec 2021, conducted a well explained webinar on ‘AWS Auto Scaling’ with Mr. Pavan Gumaste.
Pavan Gumaste is a Certified Solutions Architect and a Cloud Computing Professional with an in-depth knowledge of AWS, Azure, and Google Cloud Platform. Currently, he manages the Hands-on Labs platform at Whizlabs and helps figure out what to build, ensuring successful delivery and incorporating user learning to improve the strategy and product further.
Here are the concepts discussed:
What is Auto Scaling?
Auto Scaling is the method used in Cloud Computing that dynamically adjusts the amount of computational resources in a server farm, typically measured by the number of active users, automatically based on the load on the farm.
One of the reasons for companies moving to the Cloud is having the facility to upscale and downscale based on the client requirement.
Whenever the traffic arrives from the internet via a website or an app, it will pass through a load balancer, which will then divide it into multiple Auto Scaling groups, based on which the groups are configured. This is done to avoid load being put on a single server.
Organizations often are required to upscale and downscale their servers based on their requirements, be it static or dynamic.
AWS Auto Scaling
AWS Auto Scaling monitors the applications and adjusts capacity automatically to maintain steady and predictable performance at the lowest cost possible. It helps you in ensuring that you have the correct number of Amazon EC2 instances available to handle the load for the application.
How does Auto Scaling work?
- It creates a number of EC2 instances, and the minimum and the maximum number of instances we might require in the Auto Scaling Groups are defined.
- A desired capacity of instances is defined, either when you create the group or anytime after, Amazon EC2 ensures that the group contains the said instances.
- You specify the minimum number of instances that might be required in an Auto Scaling Group, Amazon EC2 Auto Scaling ensures that the group never goes below this size.
- You specify the maximum number of instances that might be required in an Auto Scaling Group, Amazon EC2 Auto Scaling ensures that the group never goes above this size.
When the scaling policies are defined, the Amazon EC2 Auto Scaling launches and terminates instances on demand.
Components of AWS Auto Scaling
- Launch Configuration: A launch configuration is an instance configuration template that is used by an Auto Scaling Group to launch EC2 instances.
The following parameters are required to be specified while creating any launch configuration:
- ID of the Amazon Machine Image (AMI)
- Instance type
- Key pair
- One or more security groups
- Block device mapping
These parameters are helpful while creating the clones of the new servers about to be created.
- Launch Template: A launch template is similar to a launch configuration, in that it specifies instance configuration information. Defining a launch template instead of a launch configuration allows you to have multiple versions of a Launch Template.
- Auto Scaling Groups: These are the collection of Amazon EC2 instances that are treated as a logical grouping for the purpose of automatic scaling and management. These groups allow you to use Amazon EC2 Auto Scaling features such as health check replacements and scaling policies.
- Core functionality: The core functionality of the Amazon EC2 Auto Scaling service is to maintain the number of instances in an Auto Scaling Group.
For example, if we are watching an IPL match or a football match on Hotstar or Netflix, the number of users watching might rise from 1 million to 10 million at the climax of the game. This should not let the application crash. So, what happens is that initially we are using a certain number of instances, then Auto Scaling comes into play and increases the instances.
- Size: The size of the Auto Scaling Group depends on the number of instances that were set as the desired capacity initially, which is set as per the average no. of users. The number of the instances will increase or decrease as per demand, either through manual scaling or automatic scaling.
Types of Scaling based on how to scale
Horizontal Scaling: By adding more servers or machines to the Auto Scaling Group in order to help scaling. It focuses on the availability
Vertical Scaling: By adding more power rather than more units, for instance adding more RAMv. It enhances the performance.
Scaling to be chosen depends on the type of application and work.
In the above example, in the case of Vertical Scaling, the capacity of the server is increasing, while for Horizontal Scaling, the no. of clones is increasing so that the load bearing capacity is divided. Both kinds of scaling can also be used in combination.
Types of Scaling based on when to scale
- Predictive Auto Scaling: This type of scaling deploys predictive analytics, including historical usage data and recent usage trends, used in Auto Scaling based on predictions about its usage in the future.
- Scheduled Auto Scaling: This is a kind of hybrid approach to scaling policy that functions in real time, and also anticipates changes in traffic loads and executes policy reactions to those changes at specific times.
- It is used when we are able to anticipate the traffic.
Benefits of Auto Scaling
- Better fault tolerance
- Better cost management
- High availability of resources
- Increased reliability of resources
- Improved flexibility of resources
The process of Auto Scaling
Suppose we are given an application with requirements and we have to auto scale it. Then, we will:
- Explore the required application and create a Cloud system that adds and removes EC2 instances as per the requirement or load.
- Choose the service that is to be auto scaled.
- Optimize the service. Based on metric changes, scale the application in response to predictable load changes.
- Keep tracing the load and maintain a steady count of instances.
Prerequisites for Auto Scaling
- Virtual Private Cloud(VPC): You create instances inside it based on requirement.
- EC2 Instances: This is a typical server having an Operating System and storage, enabled with SSH or HTTP port, that helps in communicating with the instance.
- Security Groups: These are attached to the EC2 instances.
- Availability Zones: Data centers are divided into availability zones, which ensure that a fault in one of the data centers does not affect the availability of the application.
- Elastic Load Balancer: It acts as an intermediary between the traffic and the servers and divides the traffic among various availability zones.
Auto Scaling and Load Balancing
An application Load Balancer Auto Scaling package works in tandem.
- You can deploy an Auto Scaling Group Load Balancer to improve the availability and performance, and decrease application latency.
- This works because you can define your Auto Scaling policies based on your application requirements, to scale-in and scale-out instances and thus, instruct the load balancer to distribute the traffic load between the running instances.
- Auto Scaling allows a user to set a policy based on a predefined criteria that manages the number of available instances in both peak and off-peak hours, enabling multiple instances with the same functionality.
To get a better understanding of the concepts, refer to the hands-on session.
The clarity and brevity demonstrated by the instructor on the concept is amazing. Watch the complete webinar on the below link:
https://www.youtube.com/watch?v=2CTEqYAzqm4
- Top 25 DevSecOps Interview Question and Answers for 2024 - March 1, 2023
- How to prepare for VMware Certified Technical Associate [VCTA-DCV] Certification? - February 14, 2023
- Top 20 Cloud Influencers in 2024 - January 31, 2023
- 25 Free Question on SC-100: Microsoft Cybersecurity Architect - January 27, 2023
- Preparation Guide on MS-101: Microsoft 365 Mobility and Security - December 26, 2022
- Exam tips to prepare for Certified Kubernetes Administrator: CKA Exam - November 24, 2022
- Top Hands-On Labs To Prepare For AWS Certified Cloud Practitioner Certification - October 27, 2022
- Why do you need to upskill your teams with the Azure AI fundamentals? - October 11, 2022