Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
AWS Cloud Computing Cloud Computing: From Zero to Production EC2 Module 3 — Compute Services Scaling

Auto Scaling Groups — Automatic Scaling Explained

Reviewed & accurate
AI Summary

What You Will Learn

Intermediate

  • What Auto Scaling Groups are
  • How scaling policies work
  • How to set up auto scaling
Vertical vs Horizontal ScalingVertical Scaling (Scale Up)Server: 2 CPU, 4GBUpgrade: 8 CPU, 32GBBigger machine. Has a limit.Downtime during upgradeHorizontal Scaling (Scale Out)Server 1Server 2Server 3+ add more serversMore machines. No limit.No downtime. Cloud-native.Requires: load balancer
Vertical = bigger machine (limited). Horizontal = more machines (unlimited, cloud-native).

An Auto Scaling Group (ASG) automatically adds or removes EC2 instances based on demand. Traffic up = add instances. Traffic down = remove instances. You save money and handle spikes.

Key Components

ComponentWhat it does
Launch TemplateBlueprint for new instances (AMI, type, security group)
Scaling PolicyWhen to scale (CPU > 70%? add instance)
Min/Max/DesiredMinimum, maximum, and desired instance count
Typical setup
Min: 2 (always running), Desired: 2 (start here), Max: 10 (never more than 10). Scale when average CPU > 70% for 5 minutes.

Practical Exercise

Go to EC2 -> Auto Scaling Groups
Create a Launch Template (AMI + t2.micro + security group)
Create an ASG with min=2, max=4, desired=2
Set a scaling policy: CPU > 70% for 5 min -> add 1 instance

Key Takeaways

  • ASG automatically adds/removes EC2 instances based on demand.
  • Launch Template = blueprint for new instances.
  • Scaling Policy = when to scale (e.g., CPU > 70%).
  • Min/Max/Desired controls the instance count range.
  • Saves money: scale in when traffic is low.
Previously: Lesson 18 covered Lambda.
Today: You learned: Automatically scale EC2 instances.
Next: Lesson 20 covers Load Balancers.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments