Day 49 โ Auto Scaling Groups in AWS with the vprofile Stack


Today I worked on Auto Scaling Groups (ASG) in AWS by implementing them for the vProfile
project โ a real-world Java web app architecture that simulates a production stack.
๐ง Tech Stack Overview (vProfile Project)
Hereโs the complete application infrastructure I worked with:
Component | Role |
MySQL | Relational database |
Memcached | In-memory cache |
RabbitMQ | Message broker |
Tomcat | Java-based app server |
Nginx | Reverse proxy/web server |
๐ฉ๏ธ What is an Auto Scaling Group?
An Auto Scaling Group in AWS:
Ensures EC2 instances maintain desired capacity
Automatically scales out/in based on CloudWatch metrics (CPU, network, etc.)
Works in tandem with Launch Templates or Launch Configurations
Integrates with Load Balancers (like ALB/NLB)
๐๏ธ Steps I Followed for Auto Scaling the vProfile App:
Created a Launch Template
- Configured EC2 with user data to install dependencies like Tomcat, Java, app war file, etc.
Configured an Application Load Balancer
- Listener: Port 80 โ Target Group (EC2 instances running vProfile)
Defined Auto Scaling Group
Minimum instances: 2
Desired capacity: 2
Maximum: 5
Scaling policy: Target CPU > 70%
Connected ASG to ALB
- Ensures traffic routing to healthy instances only
Tested Scaling
Simulated high CPU to trigger scale out
Saw new EC2 instances come up automatically ๐
๐ก Why Auto Scaling Matters
Cost-efficient: Scale-in during low traffic hours
Highly Available: Replaces unhealthy EC2 instances
Elastic: Adapts dynamically to load
๐ง Key Learning:
Configuring Auto Scaling taught me how critical automation and elasticity are for cloud-native apps. When tied with monitoring (CloudWatch) and ALBs, ASGs become a powerful force to ensure uptime and scalability.
๐ Up Next:
Iโll be exploring s3 and how to host a wordpress site on s3.
Subscribe to my newsletter
Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
