Setting-up Auto-scaling Group
- In continuation to previous lab, let’s create Auto-scaling group where we will define scaling polices
Go to EC2 Dashboard and scroll down to Auto Scaling Groups
- Select below highlighted settings
- Give it a name
Group size as 2, which means our Application or web cluster will have minimum 2 instance at any given point in time
Select all subnet, which means we are allowing Auto-scaling to all 6 AZ for EC2 deployment
- We are saying scale between 2 to 4, which means in scenario of CPU 2 more instance can be added (2+1+1)
We would scale on CPU load condition, whenever CPU load is 70% or more on an average of AS instance it will try to add one instance
- You can notification
- Tag it properly, make it a habit to use tags
- As soon as you create ASG, two instance will start spinning-up even if try to delete anyone of these instance auto-scale will create new one