0
0
Azurecloud~10 mins

Container Apps scaling rules in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Container Apps scaling rules
App receives traffic/load
Monitor metrics (CPU, HTTP requests, etc.)
Evaluate scaling rules
Scale Out
Add container
App adjusts container count
Repeat monitoring
The app watches its load, checks rules, then adds or removes containers to handle traffic smoothly.
Execution Sample
Azure
scaleRule:
  name: http-scaler
  type: http
  metadata:
    concurrentRequests: '50'
This rule scales out when concurrent HTTP requests exceed 50, and scales in when below.
Process Table
StepMetric ObservedCurrent ContainersRule EvaluatedAction TakenNew Container Count
140 concurrent requests2Requests < 50No scaling2
255 concurrent requests2Requests > 50Scale out3
370 concurrent requests3Requests > 50Scale out4
445 concurrent requests4Requests < 50Scale in3
530 concurrent requests3Requests < 50Scale in2
625 concurrent requests2Requests < 50No scaling2
💡 Load stabilizes below threshold, no further scaling needed.
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5After Step 6
concurrentRequests0405570453025
containerCount2234322
Key Moments - 3 Insights
Why does the container count increase when requests go from 40 to 55?
Because the scaling rule triggers when concurrent requests exceed 50, as shown in step 2 of the execution_table.
Why does the container count decrease when requests drop from 70 to 45?
The rule scales in when requests fall below 50, so at step 4 the container count reduces from 4 to 3.
Why is there no scaling at step 6 even though requests are 25?
Because the container count is already at minimum needed (2), so no further scale-in happens as per the rule.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the container count after step 3?
A4
B3
C2
D5
💡 Hint
Check the 'New Container Count' column at step 3 in the execution_table.
At which step does the scaling rule first trigger a scale out?
AStep 1
BStep 4
CStep 2
DStep 5
💡 Hint
Look for the first 'Scale out' action in the 'Action Taken' column.
If the concurrentRequests threshold was changed to 60, what would happen at step 3?
AScale out to 4 containers
BNo scaling, remain at 3 containers
CScale in to 2 containers
DScale out to 5 containers
💡 Hint
Compare the 'Metric Observed' at step 3 with the new threshold and check the 'Rule Evaluated' logic.
Concept Snapshot
Container Apps scaling rules watch app load metrics.
If load exceeds thresholds, containers are added (scale out).
If load drops below thresholds, containers are removed (scale in).
Rules use metrics like CPU, HTTP requests.
This keeps app responsive and cost-efficient.
Full Transcript
Container Apps scaling rules work by monitoring app load metrics such as concurrent HTTP requests. When the load goes above a set threshold, the app adds containers to handle the extra traffic, called scaling out. When the load drops below the threshold, it removes containers, called scaling in. This process repeats continuously to keep the app responsive without wasting resources. For example, if the rule triggers at 50 concurrent requests, the app will add containers when requests go above 50 and remove them when below. The execution table shows how container count changes step by step as load varies. This helps beginners see how scaling decisions happen in real time.