Auto Scaling Groups

Auto-scaling is a scaling method to scale your ec2 instance up or down according to the workload of an application. you create a collection of instances that come under Auto-scaling groups. So basically Auto scaling group is defined as a group where you can define the minimum number of instances and maximum number of instances and more. Like you have an application that runs on EC2 and suddenly your traffic increases on your application and you want another server to run your application in that case auto-scaling helps you to automatically scale up your instances if the workload increases and scale down when not needed.

The desired number of instance

Auto Scaling Components

  • Groups

your instances are managed into groups so that they can be treated as a single unit so that they can be scaled or managed. When you create a group you have to define a minimum, maximum, and desired number of instances

  • Templates

your group uses a launch. template or configure templates for running your ec2 instances. you can specify your EC2 instance configuration.

Types of Auto Scaling

Basically auto-scaling is of two type

  1. Horizontal Auto Scaling
  2. Vertical Auto Scaling
  • Horizontal Autoscaling

A type of auto-scaling in which you can increase your work efficiency by adding more instances of the same configuration. If the workload increases on your instance then another instance goes up which you define in your group and handles the load with your instance

  • Vertical Auto Scaling

AWS also provides you an option for scaling your instances vertically i.e. you can increase your instance configuration. For example, if you are using instances with 2GB and 2 core configurations and need more then you can also increase your configuration under this option.

Get started with AutoScaling

  • If you have an AWS account then log in to your account, if not then you have to create your AWS account to access the services of AWS. You can create your AWS account by using the link given below.( https://portal.aws.amazon.com/)
  • In your AWS account on the top left search for EC2.
  • In your EC2 dashboard on the left side scroll down and you will find an option for Auto Scaling And Auto Scaling Group
  • Click on the Auto Scaling group option and you have to create a group in which you will define your configuration of scaling an instance.
  • click on Create Autoscaling group and you will see a page to create a group.
  • Before creating a group you have to create a template in which you will define your instance configuration. you will also create a template from the Launch template option by clicking on Creating a Launch template.
  • Just like creating an ec2 instance, you have to create your launch template with the required configuration.
  • After creating the template, Select your created template and click next.
  • After clicking on next choose your network in which VPC and which subnet you want to run your instance.
  • You will find an option of instance type requirements in which if you want to override your instance template you can choose to override the launch template by specifying different instance attributes or manually adding instance types. Then click on next.

In the next step, you will find an option for load balancing if you want to load balance your application you can choose one of the options provided. you can attach or create a load balancer.

  • Below the load balancer, you will find VPC Lattice integration options that help you improve networking capabilities and scalability, and integrate your Auto Scaling group with VPC Lattice. VPC Lattice facilitates communications between AWS services and enables you to connect and manage your applications across compute services in AWS. you will proceed with no VPC Lattice integration option or attach a VPC Lattice integration option you created.
  • you will find an option for a health check and how much time the process is repeated again last additional option for monitoring and then click Next.
  • In the next step, you will find an option for Group size in which you can specify the size of the Auto Scaling group by changing the desired capacity. You can also specify minimum and maximum capacity limits. Your desired capacity must be within the limited range
  • Next, you will find an option for scaling policy in which you will dynamically resize your Auto Scaling group to meet changes in demand.
  • Instance scale-in protection helps you to protect your newly launched instance from scale-in by default. Click on next for next step.
  • If you want to send notifications to SNS whenever your instance auto-scaling you can configure it in the notification section. click next for further steps.
  • If you want to add a tag to your group then add and click next. you will see a page for reviewing your configuration scroll down and click on Create auto-scaling group.
  • In the auto-scaling group dashboard you will see your group select that group go to instances management and you will see that your instance is ready.
  • If you go to your ec2 instance dashboard you will see that your instance is created if you delete your terminate your instance it will create a new instance automatically this is because you have defined a desire number of instance that run so it helps you to run desire number of instance.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top