0
0
Azurecloud~10 mins

VM Scale Sets for auto scaling in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - VM Scale Sets for auto scaling
Start VM Scale Set
Monitor Metrics
Check Scale Rules
Scale Out
Add VM Instances
Update Load Balancer
Continue Monitoring
The VM Scale Set starts and monitors performance metrics. If rules say to scale out, it adds VM instances and updates the load balancer, then continues monitoring.
Execution Sample
Azure
1. Create VM Scale Set with 2 VMs
2. Monitor CPU usage
3. If CPU > 70%, add 1 VM
4. If CPU < 30%, remove 1 VM
5. Repeat monitoring
This setup automatically adds or removes VM instances based on CPU usage thresholds.
Process Table
StepCPU Usage (%)Current VM CountConditionAction TakenResulting VM Count
150250 > 70? NoNo scaling2
275275 > 70? YesScale out: add 1 VM3
365365 > 70? NoNo scaling3
425325 < 30? YesScale in: remove 1 VM2
540240 < 30? NoNo scaling2
680280 > 70? YesScale out: add 1 VM3
785385 > 70? YesScale out: add 1 VM4
860460 > 70? NoNo scaling4
920420 < 30? YesScale in: remove 1 VM3
1030330 < 30? NoNo scaling3
💡 Monitoring stops after step 10; scaling decisions made based on CPU thresholds.
Status Tracker
VariableStartAfter 1After 2After 3After 4After 5After 6After 7After 8After 9After 10
CPU Usage (%)N/A50756525408085602030
VM Count22332234433
Key Moments - 3 Insights
Why does the VM count not change when CPU usage is 50% at step 1?
Because 50% is not greater than the scale-out threshold of 70%, so no scaling action is taken as shown in execution_table row 1.
Why does the VM count decrease at step 4 when CPU usage is 25%?
Because 25% is below the scale-in threshold of 30%, triggering removal of one VM instance as shown in execution_table row 4.
Why are multiple scale-outs possible in consecutive steps like 6 and 7?
Because CPU usage remains above 70%, each check triggers adding one VM, increasing VM count step by step as shown in execution_table rows 6 and 7.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the VM count after step 3?
A2
B3
C4
D1
💡 Hint
Check the 'Resulting VM Count' column at step 3 in the execution_table.
At which step does the CPU usage first trigger a scale-in action?
AStep 2
BStep 6
CStep 4
DStep 9
💡 Hint
Look for the first 'Scale in' action in the 'Action Taken' column in execution_table.
If the scale-out threshold changed from 70% to 80%, what would happen at step 2?
ANo scaling would happen
BScale in would happen
CScale out would still happen
DVM count would decrease
💡 Hint
Compare CPU usage at step 2 with the new threshold and check the 'Condition' column.
Concept Snapshot
VM Scale Sets automatically add or remove VM instances based on performance metrics.
Set thresholds (e.g., CPU > 70% to scale out, CPU < 30% to scale in).
Monitor metrics continuously.
Scale out adds VMs; scale in removes VMs.
Load balancer updates to distribute traffic.
This ensures apps handle demand efficiently.
Full Transcript
VM Scale Sets start with a set number of VMs. They monitor CPU usage regularly. If CPU usage goes above 70%, the system adds one VM to handle more load. If CPU usage falls below 30%, it removes one VM to save resources. This process repeats, adjusting the number of VMs to match demand. The load balancer updates to include new VMs or exclude removed ones. This automatic scaling helps keep applications responsive and cost-effective.