Skip to main content

Command Palette

Search for a command to run...

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

Setting Up Auto Scaling Groups in AWS Using the vprofile Stack

Published
2 min read
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:

ComponentRole
MySQLRelational database
MemcachedIn-memory cache
RabbitMQMessage broker
TomcatJava-based app server
NginxReverse 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:

  1. Created a Launch Template

    • Configured EC2 with user data to install dependencies like Tomcat, Java, app war file, etc.
  2. Configured an Application Load Balancer

    • Listener: Port 80 → Target Group (EC2 instances running vProfile)
  3. Defined Auto Scaling Group

    • Minimum instances: 2

    • Desired capacity: 2

    • Maximum: 5

    • Scaling policy: Target CPU > 70%

  4. Connected ASG to ALB

    • Ensures traffic routing to healthy instances only
  5. 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.

DevOps overview as a beginner

Part 49 of 50

Sharing my journey of learning DevOps as a beginner — covering essential tools, cloud setup, CI/CD, Docker, monitoring, and more, step by step with practical examples.

Up next

Day 50: Amazon S3 Demystified – The Backbone of Cloud Storage

Amazon S3 Insights: A Pillar of Cloud Storage.