Skip to content

Cloud Auto Scaling Lab

Load balancing distributes traffic across available servers. Auto scaling changes how many servers are available as workload demand changes.

Welcome to Lab 14 of the CompTIA Cloud+ practical lab sequence.

In Lab 13, you improved application availability by moving from:

User
↓
WEB-01

to:

User
↓
Load Balancer
/ \
↓ ↓
WEB-01 WEB-02

This removed one major web-tier single point of failure.

However, there is still an operational challenge.

What happens when:

Normal Traffic
↓
WEB-01 + WEB-02
↓
Enough Capacity

suddenly becomes:

Heavy Traffic
↓
WEB-01 + WEB-02
↓
Insufficient Capacity

You could manually deploy more servers.

But modern cloud environments can respond automatically.

In this lab, you will build:

Internet
↓
Load Balancer
↓
Auto Scaling Group
/ | \
↓ ↓ ↓
WEB-01 WEB-02 WEB-03
↑
Created When Needed

You will learn how cloud environments automatically:

  • add capacity

  • remove capacity

  • replace unhealthy instances

  • maintain minimum capacity

  • respond to monitoring metrics

  • integrate scaling with load balancing

  • balance availability and cost

Item Details
Lab 14 β€” Cloud Auto Scaling Lab
Difficulty Intermediate
Estimated Time 120–180 Minutes
Certification Alignment CompTIA Cloud+
Primary Focus Elasticity & Automated Capacity Management
Previous Lab 13 β€” Cloud Load Balancing Lab
Career Alignment Cloud Administrator, Cloud Engineer, DevOps Engineer, Solutions Architect
Major Skills Auto Scaling, Templates, Scaling Policies, Metrics, Load Balancing, Health Checks
Deliverable Auto-Scaling Web Architecture + Scaling Validation Report

Your organization now operates a load-balanced web application.

Current architecture:

Internet
↓
Load Balancer
↓
WEB-01 + WEB-02

During normal business hours:

2 Web Servers
↓
Enough Capacity

During peak periods:

2 Web Servers
↓
High Utilization
↓
Performance Degradation

The operations team currently responds manually:

Alert
↓
Administrator
↓
Create VM
↓
Configure VM
↓
Add to Load Balancer

This approach is:

  • slow

  • inconsistent

  • operationally expensive

  • difficult during sudden traffic spikes

Management requires a new architecture that can:

automatically increase and decrease web-tier capacity based on demand.

By completing this lab, you should be able to:

  • explain cloud elasticity

  • explain auto scaling

  • distinguish elasticity from scalability

  • distinguish auto scaling from load balancing

  • understand instance templates

  • configure minimum capacity

  • configure desired capacity

  • configure maximum capacity

  • create an auto-scaling group

  • integrate scaling with a load balancer

  • understand scaling policies

  • configure metric-based scaling

  • understand threshold-based scaling

  • understand scheduled scaling

  • understand predictive scaling concepts

  • trigger scale-out

  • observe new workload creation

  • validate backend registration

  • trigger scale-in

  • understand cooldown and stabilization

  • understand instance health replacement

  • identify scaling-related costs

  • monitor scaling activity

  • troubleshoot failed scaling events

  • document an elastic cloud architecture

Scalability is the ability of a system to handle increased demand.

You can scale:

Vertically

or:

Horizontally

Vertical scaling means increasing the capacity of an existing resource.

Example:

Small VM
↓
Larger VM
↓
More CPU
More RAM

This is also called:

Scale Up

The reverse is:

Scale Down

Horizontal scaling means changing the number of resources.

Example:

WEB-01

becomes:

WEB-01
WEB-02
WEB-03

This is:

Scale Out

Removing resources is:

Scale In

Elasticity extends the scaling concept.

Elastic systems dynamically adjust resources according to demand.

Demand Increases
↓
Resources Increase
Demand Decreases
↓
Resources Decrease

Remember:

Scalability
=
Ability to Handle Growth

while:

Elasticity
=
Ability to Dynamically Adjust Capacity

Auto scaling automates horizontal capacity changes.

Instead of:

Administrator
↓
Create VM

you configure:

Policy
↓
Metric
↓
Threshold
↓
Scaling Action

From Lab 13:

Internet
↓
Load Balancer
/ \
↓ ↓
WEB-01 WEB-02
\ /
↓ ↓
APP-01
↓
DB-01

The load balancer already knows how to distribute traffic.

Now you will automate:

web-server capacity.

Your target becomes:

Internet
↓
Load Balancer
↓
Auto Scaling Group
/ | \
↓ ↓ ↓
WEB-01 WEB-02 WEB-03

The number of web servers can change dynamically.

For this lab, use a simple capacity model.

Example:

Minimum Capacity:
2
Desired Capacity:
2
Maximum Capacity:
4

Minimum capacity defines:

the smallest number of instances the scaling group should maintain.

Example:

Minimum = 2

means:

WEB-01
WEB-02

should remain available under normal group operation.

Desired capacity represents:

the number of instances the group currently attempts to maintain.

Example:

Desired = 2

The scaling system attempts to maintain:

2 Running Instances

Maximum capacity prevents unlimited scale-out.

Example:

Maximum = 4

Even if demand continues increasing:

WEB-01
WEB-02
WEB-03
WEB-04

becomes the configured upper limit.

Without boundaries, automated scaling could potentially create:

  • unexpected costs

  • resource exhaustion

  • quota problems

  • downstream overload

Document:

Setting Value
Minimum 2
Desired 2
Maximum 4

Auto scaling needs to know:

What should a new web server look like?

Instead of manually configuring every VM, define a reusable template.

Conceptually:

Instance Template
|
β”œβ”€β”€ Image
β”œβ”€β”€ Instance Size
β”œβ”€β”€ Network
β”œβ”€β”€ Security
β”œβ”€β”€ Storage
β”œβ”€β”€ IAM Identity
└── Startup Configuration

Cloud providers may use names such as:

  • launch template

  • instance template

  • VM scale-set model

  • instance configuration

For Cloud+, focus on the architecture.

Document:

Operating System:
Instance Size:
Web Service:
Subnet:
Security Group:
Workload Identity:
Startup Configuration:
Tags:

Poor scaling design:

New VM
↓
Administrator Logs In
↓
Installs Web Server
↓
Copies Files
↓
Configures Service

This does not scale well.

Prefer:

New VM
↓
Template
↓
Automatic Configuration
↓
Web Service Ready

Your instance should automatically configure itself when launched.

Conceptually:

Boot
↓
Install / Validate Web Service
↓
Deploy Application
↓
Start Service
↓
Expose Health Endpoint

Ensure new instances expose:

/health

returning:

OK

This allows the load balancer to determine when the instance is ready.

For training purposes, configure the web page to show a unique server identifier.

Example:

CompTIA Cloud+ Auto Scaling Lab
Server:
<hostname>

This makes newly created instances visible during testing.

Create an instance template using your provider’s supported service.

Example name:

cloudplus-web-template

Configure:

  • approved machine image

  • small instance size

  • web-tier network

  • web-tier security

  • workload identity where required

  • startup configuration

  • standard tags

Verify the template does not contain:

Passwords
Static Access Keys
Private Keys
Hard-Coded Secrets

Use workload identity and approved secret-management mechanisms where appropriate.

Ensure instances created from the template will be placed into:

the intended web-tier network.

New instances should accept application traffic from:

Load Balancer

not unnecessarily from:

Entire Internet

where your architecture supports private backends.

Create:

cloudplus-web-asg

or your provider’s equivalent scaling group.

Associate:

cloudplus-web-template

Set:

Minimum:
2
Desired:
2
Maximum:
4

Choose the web-tier subnets.

Where supported, use more than one:

Availability Zone A
+
Availability Zone B

This improves failure-domain distribution.

Associate the scaling group with:

cloudplus-web-backends

or the equivalent backend pool/target group from Lab 13.

The architecture becomes:

Auto Scaling Group
↓
Creates Instance
↓
Registers Backend
↓
Load Balancer Health Check
↓
Receives Traffic

The scaling group should attempt to maintain:

Desired Capacity = 2

Record:

Instance Status Health
Web Instance 1
Web Instance 2

Open the load-balancer backend view.

Expected:

WEB Instance 1
HEALTHY
WEB Instance 2
HEALTHY

Access:

web.cloudplus.lab

Expected:

DNS
↓
Load Balancer
↓
Healthy Auto-Scaled Backend

Capacity does not change automatically simply because a scaling group exists.

You need:

scaling logic.

Common approaches include:

  • metric-based scaling

  • target tracking

  • step scaling

  • scheduled scaling

  • predictive scaling

Example:

CPU > 70%
for defined period
↓
Scale Out

and:

CPU < 30%
for defined period
↓
Scale In

A target-tracking policy attempts to maintain a metric around a target.

Example:

Target CPU
=
50%

Conceptually:

CPU Too High
↓
Add Capacity
CPU Too Low
↓
Remove Capacity

Step scaling can use different actions depending on severity.

Example:

CPU 60–70%
↓
Add 1
CPU 70–85%
↓
Add 2
CPU >85%
↓
Add More Capacity

Exact implementations vary by provider.

Some workloads have predictable schedules.

Example:

08:00
↓
Increase Capacity
20:00
↓
Reduce Capacity

This is useful when demand follows known patterns.

Predictive scaling uses historical patterns or forecasting mechanisms to anticipate future demand.

Conceptually:

Historical Demand
+
Forecast
↓
Capacity Prepared
Before Demand Arrives

For this lab, use a simple metric such as:

average CPU utilization

Example training threshold:

CPU > 60%
↓
Scale Out

Use your provider’s available policy type.

Conceptually:

Average CPU
> 60%
↓
Increase Desired Capacity

Do not use unnecessarily aggressive settings in production environments.

Conceptually:

Average CPU
< 30%
↓
Decrease Capacity

The group must still respect:

Minimum Capacity

Imagine:

CPU High
↓
Add Server
↓
New Server Booting

CPU may remain high for a short period.

Without stabilization, the system might immediately add more servers.

A cooldown allows time for:

the previous scaling action to take effect.

Scaling systems often use mechanisms to prevent:

Scale Out
↓
Scale In
↓
Scale Out
↓
Scale In

This rapid fluctuation is undesirable.

Repeated rapid capacity changes are sometimes called:

thrashing

or oscillation.

It can cause:

  • instability

  • unnecessary instance launches

  • increased cost

  • poor user experience

Document:

Metric:
Scale-Out Threshold:
Scale-In Threshold:
Evaluation Period:
Cooldown / Stabilization:
Minimum:
Maximum:

Before generating load, record:

Running Instances:
Average CPU:
Healthy Backends:
Request Count:
Desired Capacity:

Use an approved load-generation method against your own isolated lab application.

The purpose is to increase resource utilization enough to trigger the configured policy.

Do not perform load testing against systems you do not own or have permission to test.

Observe:

CPU
↓
Increasing

Wait for the metric to cross your configured threshold.

Expected:

CPU Threshold
↓
Policy Triggered

Record the event.

You may see:

Desired Capacity
2
↓
3

The scaling group should launch another workload.

Example:

WEB-03

The process becomes:

Scaling Trigger
↓
Launch Instance
↓
Boot
↓
Startup Configuration
↓
Web Service
↓
Health Check

Record:

Launch Requested:
Instance Created:
Operating System Ready:
Web Service Ready:
Health Check Passed:
Backend Registered:

Confirm:

WEB-03
↓
Web Service
↓
/health
↓
OK

Expected:

WEB-01
HEALTHY
WEB-02
HEALTHY
WEB-03
HEALTHY

Send multiple requests.

Observe responses from:

WEB-01
WEB-02
WEB-03

Your architecture performed:

Demand Increased
↓
Metric Increased
↓
Scaling Policy Triggered
↓
Desired Capacity Increased
↓
New VM Created
↓
Health Check Passed
↓
VM Added to Load Balancer
↓
Additional Capacity Available

This is:

automatic horizontal scaling.

Use:

Event:
Scale Out
Trigger:
Metric Value:
Previous Desired Capacity:
New Desired Capacity:
New Instance:
Backend Health:
Result:

If appropriate for your lab, continue controlled load long enough to observe whether another scale-out event occurs.

Remember:

Maximum Capacity = 4

If the group reaches:

WEB-01
WEB-02
WEB-03
WEB-04

it should not exceed the configured maximum through normal policy-driven scaling.

56 β€” Understand Why Maximum Capacity Is Important

Section titled β€œ56 β€” Understand Why Maximum Capacity Is Important”

Imagine downstream database capacity supports only four web servers.

Unlimited web scaling could create:

More Web Servers
↓
More Database Connections
↓
Database Overload

Scaling one tier can affect another.

Stop generating artificial demand.

Allow utilization to return toward normal levels.

Observe:

CPU
↓
Decreasing

Eventually:

Metric Below Threshold
↓
Scale-In Policy

may trigger.

Example:

Desired Capacity
3
↓
2

The scaling service selects an instance according to its termination policy.

Conceptually:

Scale-In Decision
↓
Backend Removed / Drained
↓
Instance Terminated

A safer scale-in process may use:

Stop New Requests
↓
Allow Existing Requests to Finish
↓
Deregister Backend
↓
Terminate Instance

After scale-in:

WEB-01
HEALTHY
WEB-02
HEALTHY

or equivalent instances should remain.

The group should not scale below:

Minimum = 2

even when utilization is very low.

Event:
Scale In
Trigger:
Metric:
Previous Capacity:
New Capacity:
Removed Instance:
Remaining Healthy Backends:
Application Impact:

Auto scaling is not only about demand.

It may also help maintain:

desired healthy capacity.

Suppose:

Desired Capacity = 2

and one instance fails.

The group may attempt to replace it.

In your isolated lab, safely stop or terminate one auto-scaled web instance using the appropriate test method.

Observe:

Healthy Instances
2
↓
1

Depending on configuration, health may come from:

  • compute platform

  • load balancer

  • scaling service

Expected:

Instance
↓
Unhealthy

The scaling system should attempt to return to:

Desired Capacity = 2

Conceptually:

Unhealthy Instance
↓
Removed
↓
Replacement Launched
↓
Health Check
↓
Healthy

While replacement occurs, test:

web.cloudplus.lab

The remaining healthy backend should continue serving traffic if sufficient capacity remains.

Failed Instance:
Failure Type:
Health Detection:
Replacement Started:
Replacement Instance:
Health Check:
Application Availability:
Final Capacity:

You have now introduced another cloud principle:

Failure
↓
Detect
↓
Replace
↓
Restore Desired State

This is often described as:

self-healing infrastructure.

Instead of manually managing specific servers:

I Need WEB-01
and WEB-02

you define:

I Need
2 Healthy Web Servers

The platform works toward maintaining that state.

A scalable design often prefers:

Bad Instance
↓
Replace

rather than:

Bad Instance
↓
Manually Repair Forever

This connects to immutable infrastructure concepts.

Every instance created by the scaling group should receive:

the same intended configuration.

Otherwise:

WEB-01
Works
WEB-02
Works
WEB-03
Broken

creates intermittent application problems.

Compare:

  • web service

  • health endpoint

  • application version

  • security configuration

  • IAM identity

  • network configuration

across scaled instances.

If your instance template uses an image:

Web Image v1

and you later create:

Web Image v2

you need a controlled deployment strategy.

Do not assume existing instances automatically become v2.

A common concept is:

Launch New Version
↓
Validate Health
↓
Shift Traffic
↓
Remove Old Version

This helps reduce deployment interruption.

79 β€” Understand Auto Scaling and Availability Zones

Section titled β€œ79 β€” Understand Auto Scaling and Availability Zones”

A stronger architecture may distribute instances:

Zone A
β”œβ”€β”€ WEB-01
└── WEB-03
Zone B
β”œβ”€β”€ WEB-02
└── WEB-04

This reduces dependence on one failure domain.

If:

Zone A
↓
Unavailable

instances in:

Zone B

may continue serving traffic depending on the overall architecture.

Your complete flow should now be:

Internet
↓
DNS
↓
Load Balancer
↓
Healthy Backend Pool
↓
Auto Scaling Group
↓
Web Instances

New instances should automatically receive the intended:

Workload Identity

rather than requiring manually installed credentials.

83 β€” Validate Workload Identity on a New Instance

Section titled β€œ83 β€” Validate Workload Identity on a New Instance”

On a newly scaled instance, verify:

Instance
↓
Expected Workload Identity
↓
Expected Scoped Permissions

Confirm a newly created workload does not automatically receive unnecessary permissions.

For example:

Manage IAM
DENY
Delete Network
DENY

Auto-scaled web workloads should not rely heavily on:

Unique Local Data

because instances can:

  • appear

  • disappear

  • fail

  • be replaced

Persistent data belongs in appropriate external services.

Poor design:

WEB-01
↓
Important User Data
↓
Local Disk Only

If WEB-01 is terminated during scale-in:

data may be lost or unavailable.

Conceptually:

Auto-Scaled Web Tier
↓
Application Tier
↓
Database / Object Storage / Shared Storage

If user sessions are stored only on individual servers:

User
↓
WEB-01
↓
Session Stored Locally

then later:

User
↓
WEB-03

may not have the same session.

Possible architectural approaches include:

  • external session storage

  • stateless application design

  • controlled session persistence

Common metrics can include:

  • CPU utilization

  • memory utilization

  • request count

  • queue depth

  • network throughput

  • custom application metrics

Availability varies by platform.

Suppose an application receives:

Huge Request Queue

while CPU remains moderate.

CPU alone may not accurately represent demand.

A better metric might be:

Queue Depth

or:

Requests Per Backend

Ask:

What signal actually represents capacity pressure?

This is a stronger approach than automatically choosing CPU.

Applications may publish business or service metrics.

Example:

Pending Jobs
↓
Scaling Metric

If:

Pending Jobs > Threshold

the worker tier scales out.

Architecture:

Users
↓
Queue
↓
Workers

Scaling policy:

Queue Depth Increases
↓
Add Workers

This is common in asynchronous architectures.

More capacity means:

More Instances
↓
More Cost

Auto scaling therefore supports both:

Performance
+
Cost Optimization
4 Servers
24 Γ— 7

even when demand requires only two.

Low Demand
↓
2 Servers
High Demand
↓
4 Servers
Demand Drops
↓
2 Servers

Over-provisioning means maintaining more resources than required.

Potential impact:

unnecessary cost.

Under-provisioning means insufficient resources for demand.

Potential impact:

  • slow performance

  • failed requests

  • poor user experience

Your objective is:

Enough Capacity
+
Reasonable Cost
+
Availability

Review your provider’s scaling history.

Look for:

Scale-Out Event
Scale-In Event
Instance Launch
Instance Termination
Health Replacement
Failed Scaling Action
Time Event Trigger Capacity Before Capacity After Result
Scale Out CPU High 2 3
Scale In CPU Low 3 2
Replacement Instance Failure 1 Healthy 2 Healthy

Monitor:

Desired Capacity
Current Capacity
Healthy Capacity
CPU
Request Count
Scaling Events
Failed Launches
Backend Health
Signal Purpose
Current Capacity Understand Running Resources
Desired Capacity Understand Scaling State
Healthy Backends Detect Capacity Loss
CPU Capacity Pressure
Request Count Traffic Demand
Failed Launch Detect Scaling Failure
Scaling Activity Track Automation

Examples include:

Scaling Failed
Maximum Capacity Reached
Healthy Capacity Below Minimum
Repeated Instance Replacement

These may indicate operational problems.

104 β€” Troubleshooting Scenario β€” Scale Out Does Not Occur

Section titled β€œ104 β€” Troubleshooting Scenario β€” Scale Out Does Not Occur”

Check:

Metric
↓
Threshold
↓
Evaluation Period
↓
Scaling Policy
↓
Maximum Capacity
↓
Scaling Group

105 β€” Troubleshooting Scenario β€” New Instance Launch Fails

Section titled β€œ105 β€” Troubleshooting Scenario β€” New Instance Launch Fails”

Check:

Instance Template
↓
Image
↓
Instance Type
↓
Quota
↓
Subnet Capacity
↓
Permissions

106 β€” Troubleshooting Scenario β€” Instance Launches but Never Becomes Healthy

Section titled β€œ106 β€” Troubleshooting Scenario β€” Instance Launches but Never Becomes Healthy”

Use:

Instance Running?
↓
Startup Configuration?
↓
Web Service?
↓
Correct Port?
↓
Health Endpoint?
↓
Security?
↓
Load Balancer?

107 β€” Troubleshooting Scenario β€” New Instance Is Healthy Locally but Not in Load Balancer

Section titled β€œ107 β€” Troubleshooting Scenario β€” New Instance Is Healthy Locally but Not in Load Balancer”

Focus on:

Backend Registration
+
Network Path
+
Security Rules
+
Health Check

108 β€” Troubleshooting Scenario β€” Scaling Stops at Four Instances

Section titled β€œ108 β€” Troubleshooting Scenario β€” Scaling Stops at Four Instances”

Before assuming a problem, check:

Maximum Capacity = 4

The platform may be working exactly as configured.

109 β€” Troubleshooting Scenario β€” Group Scales Below Required Capacity

Section titled β€œ109 β€” Troubleshooting Scenario β€” Group Scales Below Required Capacity”

Review:

Minimum Capacity

and scaling-group configuration.

110 β€” Troubleshooting Scenario β€” Scale-In Happens Too Quickly

Section titled β€œ110 β€” Troubleshooting Scenario β€” Scale-In Happens Too Quickly”

Review:

  • cooldown

  • stabilization

  • evaluation period

  • thresholds

111 β€” Troubleshooting Scenario β€” Scale Out and Scale In Repeat Constantly

Section titled β€œ111 β€” Troubleshooting Scenario β€” Scale Out and Scale In Repeat Constantly”

This may indicate:

scaling oscillation.

Review:

Thresholds
+
Cooldown
+
Metric Selection
+
Evaluation Window

112 β€” Troubleshooting Scenario β€” Scale-Out Occurs but Performance Remains Poor

Section titled β€œ112 β€” Troubleshooting Scenario β€” Scale-Out Occurs but Performance Remains Poor”

The bottleneck may not be the web tier.

Investigate:

Web
↓
Application
↓
Database
↓
Storage

Auto scaling one tier does not automatically scale:

the entire application.

113 β€” Troubleshooting Scenario β€” Database Becomes Overloaded After Web Scale-Out

Section titled β€œ113 β€” Troubleshooting Scenario β€” Database Becomes Overloaded After Web Scale-Out”

Your scaling policy may successfully add:

More Web Servers

which generate:

More Database Connections

The web tier improved while the database became the bottleneck.

114 β€” Troubleshooting Scenario β€” New Instances Have Wrong Application Version

Section titled β€œ114 β€” Troubleshooting Scenario β€” New Instances Have Wrong Application Version”

Review:

Instance Template
+
Image Version
+
Startup Configuration

115 β€” Troubleshooting Scenario β€” New Instances Cannot Access Object Storage

Section titled β€œ115 β€” Troubleshooting Scenario β€” New Instances Cannot Access Object Storage”

Review:

Workload Identity
↓
Role
↓
Permission
↓
Resource Scope

116 β€” Troubleshooting Scenario β€” Instances Launch in Wrong Network

Section titled β€œ116 β€” Troubleshooting Scenario β€” Instances Launch in Wrong Network”

Review:

Scaling Group
↓
Subnet Configuration

117 β€” Troubleshooting Scenario β€” Scale-In Deletes Important Data

Section titled β€œ117 β€” Troubleshooting Scenario β€” Scale-In Deletes Important Data”

This suggests application state was stored:

on ephemeral/scaled workload storage.

Review the storage architecture.

118 β€” Troubleshooting Scenario β€” Costs Increase Unexpectedly

Section titled β€œ118 β€” Troubleshooting Scenario β€” Costs Increase Unexpectedly”

Check:

Scaling History
Maximum Capacity
Scale-In Policy
Metric Behavior
Instance Size
Running Capacity

119 β€” Build the Auto Scaling Troubleshooting Framework

Section titled β€œ119 β€” Build the Auto Scaling Troubleshooting Framework”

Use:

DEMAND
↓
METRIC
↓
MONITORING
↓
THRESHOLD
↓
SCALING POLICY
↓
DESIRED CAPACITY
↓
INSTANCE TEMPLATE
↓
INSTANCE LAUNCH
↓
STARTUP CONFIGURATION
↓
HEALTH CHECK
↓
LOAD BALANCER
↓
APPLICATION

Verify:

[ ] Instance template contains no static secrets
[ ] Workload identity assigned
[ ] Least privilege applied
[ ] Network placement correct
[ ] Security groups correct
[ ] Administrative access controlled
[ ] New instances inherit required logging
[ ] New instances inherit required monitoring
[ ] Approved image used
[ ] Template changes controlled

Verify:

[ ] Minimum capacity configured
[ ] Multiple instances maintained
[ ] Load balancer integrated
[ ] Health checks enabled
[ ] Unhealthy instance replacement tested
[ ] Multiple failure domains considered
[ ] Maximum capacity configured
[ ] Scale-out validated
[ ] Scale-in validated

Review:

Minimum Capacity
Maximum Capacity
Instance Size
Scale-Out Threshold
Scale-In Threshold
Idle Capacity
Peak Capacity

Ask:

Are we paying for capacity that the workload does not require?

Finding Risk Recommendation Priority
Fixed Web Capacity Performance Risk Implement Auto Scaling High
No Maximum Capacity Cost Risk Configure Upper Limit High
Static Secrets in Template Credential Exposure Use Workload Identity Critical
Slow Scale-In Excess Cost Review Policy Medium
Aggressive Scale-In Availability Risk Add Stabilization High
Wrong Scaling Metric Poor Elasticity Use Workload-Relevant Metric High
Single Availability Zone Failure-Domain Risk Use Multiple Zones High
Internet
|
v
+---------------+
| DNS |
+---------------+
|
v
+---------------+
| Load Balancer |
+---------------+
|
v
+-----------------------+
| Auto Scaling Group |
| Min: 2 |
| Desired: Dynamic |
| Max: 4 |
+-----------------------+
/ | | \
v v v v
WEB-01 WEB-02 WEB-03 WEB-04
\ | | /
\ | | /
v
Application Tier
|
v
Database Tier
Monitoring
|
+--------------+--------------+
| |
v v
CPU / Requests Backend Health
| |
+--------------+--------------+
|
v
Scaling Policy
|
v
Auto Scaling Group
Load Balancer
↓
WEB-01
WEB-02

Capacity:

fixed.

Load Balancer
↓
Auto Scaling Group
↓
WEB-01
WEB-02
WEB-03
WEB-04

Capacity:

dynamic within defined limits.

Capture sanitized evidence of:

  • instance template

  • auto-scaling group

  • minimum capacity

  • desired capacity

  • maximum capacity

  • scaling policy

  • monitoring metric

  • initial instances

  • load-balancer integration

  • scale-out event

  • newly created instance

  • backend registration

  • scale-in event

  • instance termination

  • instance replacement test

  • final architecture

Never capture:

  • passwords

  • access keys

  • tokens

  • private keys

  • sensitive secrets

Use:

Lab:
Cloud Auto Scaling Lab
Objective:
Instance Template:
Scaling Group:
Minimum Capacity:
Desired Capacity:
Maximum Capacity:
Scaling Metric:
Scale-Out Policy:
Scale-In Policy:
Cooldown:
Load Balancer:
Scale-Out Test:
Scale-In Test:
Instance Failure Test:
Replacement Result:
Monitoring:
Security Review:
Cost Review:
Findings:
Remediation:
Lessons Learned:
Validation Status
Scalability understood
Elasticity understood
Vertical scaling understood
Horizontal scaling understood
Scale up/down understood
Scale out/in understood
Instance template created
Startup configuration automated
Minimum capacity configured
Desired capacity configured
Maximum capacity configured
Auto-scaling group created
Load balancer integrated
Initial backends healthy
Scaling metric selected
Scale-out policy configured
Scale-in policy configured
Cooldown/stabilization understood
Controlled load generated
Scale-out observed
New instance launched
New instance became healthy
New instance joined LB
Maximum capacity understood
Scale-in observed
Minimum capacity maintained
Instance failure tested
Replacement observed
Workload identity validated
Scaling logs reviewed
Security review completed
Availability review completed
Cost review completed
Architecture documented

If continuing with the Cloud+ lab sequence, retain the architecture.

The next lab will build on these resources.

Keep:

Virtual Network
Web Subnets
Application Subnet
Database Subnet
Load Balancer
Backend Pool
Instance Template
Auto Scaling Group
Application Tier
Database Tier
Workload Identity
DNS

Because auto scaling can automatically create additional billable resources:

verify the group’s desired/minimum capacity before leaving the lab environment running.

A Cloud+ scenario may say:

Application traffic increases unpredictably and administrators manually deploy additional web servers.

Think:

Auto Scaling.

Another:

The organization wants at least two web servers running at all times.

Think:

Minimum Capacity = 2

Another:

The environment must never automatically create more than six instances.

Think:

Maximum Capacity = 6

Another:

CPU utilization remains above 70% during peak periods.

Think:

Metric
↓
Scaling Policy
↓
Scale Out

Another:

CPU utilization drops after the traffic spike.

Think:

Scale In.

Another:

New instances are created but the load balancer reports them as unhealthy.

Think:

Template
↓
Startup
↓
Service
↓
Health Check
↓
Network Security

Practice without notes.

24. How would you troubleshoot a failed scale-out event?

Section titled β€œ24. How would you troubleshoot a failed scale-out event?”

CPU remains above the scaling threshold, but no new instances are created.

Use:

Metric
↓
Policy
↓
Threshold
↓
Maximum Capacity
↓
Instance Template
↓
Quota

New instances launch but never receive traffic.

Check:

Instance
↓
Web Service
↓
Health Endpoint
↓
Backend Registration
↓
Load Balancer

Capacity repeatedly changes between two and three instances.

Investigate:

Thresholds
+
Cooldown
+
Stabilization
+
Metric Behavior

The web tier scales successfully, but users still experience poor performance.

Investigate downstream dependencies:

Web
↓
Application
↓
Database
↓
Storage

The auto-scaling group keeps replacing instances.

Investigate:

Health Check
↓
Startup Configuration
↓
Application Service
↓
Instance Health

New instances cannot access object storage, but old instances can.

Compare:

Workload Identity
Role Assignment
Instance Template
Resource Scope

The environment unexpectedly creates many expensive servers.

Review:

Maximum Capacity
↓
Scaling Policy
↓
Metric
↓
Instance Type

A scale-in event removes a server and users lose data.

This indicates an architecture problem.

Persistent data should not depend on:

Disposable Auto-Scaled Instance

Marketing expects a major traffic increase every Friday at 6 PM.

Consider:

scheduled scaling

possibly combined with dynamic scaling.

The business wants infrastructure prepared before predictable traffic arrives.

Think:

predictive or scheduled scaling, depending on platform capability and requirements.

Use:

DEMAND
↓
METRIC
↓
MONITORING
↓
POLICY
↓
MIN / DESIRED / MAX
↓
INSTANCE TEMPLATE
↓
AUTO SCALING GROUP
↓
HEALTH CHECK
↓
LOAD BALANCER
↓
APPLICATION

Avoid:

β€œAuto scaling automatically adds servers when CPU is high.”

A stronger answer is:

β€œI would define minimum, desired, and maximum capacity, create a standardized instance template, integrate the scaling group with the load balancer and health checks, select a metric that accurately represents workload demand, configure controlled scale-out and scale-in policies with appropriate stabilization, and monitor scaling events, backend health, application performance, and cost. I would also validate instance replacement and ensure persistent application state is external to disposable scaled workloads.”

That demonstrates Cloud Engineer, DevOps Engineer, and Solutions Architect thinking.

Keep sanitized versions of:

Load Balancer
↓
Auto Scaling Group
↓
Dynamic Web Capacity

Document:

Minimum:
2
Desired:
2
Maximum:
4

Show:

Demand Increase
↓
Policy Trigger
↓
2 β†’ 3 Instances

Show:

Demand Decrease
↓
Policy Trigger
↓
3 β†’ 2 Instances

Document:

Instance Failure
↓
Health Detection
↓
Replacement
↓
Desired Capacity Restored

Document:

Problem
↓
Metric
↓
Policy
↓
Template
↓
Launch
↓
Health
↓
Root Cause
↓
Remediation

Instead of:

Configured auto scaling.

Use:

Implemented an elastic cloud web architecture using standardized instance templates, minimum/desired/maximum capacity controls, metric-driven scaling policies, load-balancer integration, health checks, and automated unhealthy-instance replacement.

Or:

Validated cloud scale-out and scale-in behavior under controlled workload demand while monitoring capacity, backend health, scaling events, application availability, and infrastructure cost.

Or:

Troubleshot auto-scaling failures across monitoring metrics, scaling policies, instance templates, startup automation, IAM, networking, load-balancer registration, and application health checks.

You should now be able to:

  • explain scalability

  • explain elasticity

  • distinguish vertical and horizontal scaling

  • explain scale up/down/out/in

  • explain auto scaling

  • configure capacity boundaries

  • understand instance templates

  • automate workload creation

  • understand scaling policies

  • use monitoring metrics for scaling

  • understand target tracking

  • understand step scaling

  • understand scheduled scaling

  • understand predictive scaling

  • understand cooldown

  • identify scaling oscillation

  • integrate auto scaling with load balancing

  • validate scale-out

  • validate scale-in

  • understand minimum and maximum capacity

  • test instance replacement

  • understand self-healing infrastructure

  • understand stateless workload design

  • identify downstream bottlenecks

  • analyze scaling cost

  • troubleshoot auto-scaling architectures

You have evolved the web architecture from:

Fixed Capacity
↓
WEB-01
WEB-02

to:

Monitoring
↓
Scaling Policy
↓
Auto Scaling
↓
Load Balancer
/ | \
↓ ↓ ↓
WEB-01 WEB-02 WEB-03

Your cloud architecture now combines:

Load Balancing
+
Health Checks
+
Automated Provisioning
+
Elastic Capacity
+
Failure Replacement
+
Monitoring
+
Cost Control

The key lesson is:

Cloud elasticity is not simply about adding more servers. It is about automatically maintaining the right amount of healthy capacity based on workload demand, availability requirements, operational controls, and cost constraints.

Your application can now:

Distribute Traffic
+
Scale Capacity
+
Replace Failed Web Instances

But you still need visibility into what the environment is doing.

When something goes wrong, a Cloud Engineer must answer:

What Happened?
When Did It Happen?
Which Resource Was Affected?
What Was the Metric?
What Do the Logs Show?
Should Someone Be Alerted?

The next lab introduces:

Cloud Monitoring and Alerting

You will work with:

  • infrastructure metrics

  • CPU and memory monitoring

  • network metrics

  • disk metrics

  • application signals

  • dashboards

  • thresholds

  • alarms

  • notifications

  • availability monitoring

  • load-balancer metrics

  • auto-scaling metrics

  • alert investigation

  • monitoring-driven troubleshooting

You will move from:

Cloud Infrastructure
↓
Running

to:

Cloud Infrastructure
↓
Metrics + Health
↓
Monitoring
↓
Alert
↓
Investigation

➑️ Next: Lab 15 β€” Cloud Monitoring and Alerting Lab