1.3: Create Azure App Service web apps - Scale apps in Azure App Service Flashcards
What is autoscaling?
Autoscaling is a cloud system or process that adjusts available resources based on the current demand. Autoscaling performs scaling in and out, as opposed to scaling up and down.
Describe Azure App Service autoscaling
Autoscaling in Azure App Service monitors the resource metrics of a web app as it runs.
It ensures additional resources are available before the system becomes overloaded.
It adds or removes webservers and managed load balancing.
It has on effect CPU, memory or storage, it only changes the number of web servers.
Describe autoscaling rules
Autoscaling makes decisions based upon rules you define.
A rule is a threshold for a metric - which once crossed triggers an autoscale event.
When should you consider autoscaling?
Consider autoscaling when you can’t easily predict the workload in advance, or when the workload is likely to vary by date or time. For example, you might expect increased/reduced activity for a business app during holidays.
If your web apps perform resource-intensive processing as part of each request, then autoscaling might not be an effective approach - manually scaling may be better.
utoscaling isn’t the best approach to handling long-term growth - which is predictable. You should scale manually instead, as this avoids the overhead of autoscale resource monitoring.
Describe options for autoscale conditions
You can scale by:
1. Metric - CPU utilisation, HTTP request queue length
2. Instance count - scale to a specific instance count at a specified date/time (schedule)
Describe the metrics you can use for autoscale rules
- CPU Percentage
- Memory Percentage
- Disk Queue Length
- Http Queue Length
- Data In
- Data Out
In autoscaling what is a ‘time grain’?
A time grain in the period of time over which the values retrieved for a metric for all instances are aggregated.
In autoscaling what is a ‘time aggregation’?
The aggregated value generated for a time grain is known as the time aggregation
In autoscaling what aggregation options are available?
- Average
- Minimum
- Maximum
- Sum
- Last
- Count
In autoscaling what is a ‘duration’?
In addition to creating a time-aggregation for a time-grain, an autoscale rule creates a further aggregation using each time-aggregation over a longer, user-specified, period. That period is know as the duration.
The minimum length of a duration period is 5 minutes.
The type aggregation for a duration can be different to that of a time-grain.
e.g. a time-aggregation aggregation type could be ‘Average’, but the duration aggregation type could be ‘Max’
Describe autoscale actions
Can scale-out or scale-in.
Uses an operator (such as less than, greater than, equal to, and so on) to determine how to react to the threshold.
Scale-out actions typically use the greater than operator.
Scale-in actions tend to use the less than operator.
An autoscale action can also set the instance count to a specific level, rather than incrementing or decrementing the number available.
sDescribe autoscale action cool down period
It’s an interval in which the rule won’t be triggered again.
It’s to allow the system to stabilize between autoscale events.
The minimum cool down period is five minutes.
Why should you pair autoscale rules?
If you have a rule to scale out (which will cost you more), you should want a rule to scale in (which will cost you less)
Describe autoscaling when using multiple rules
When scaling out any rule will trigger it.
When scaling in all rules must be satisfied.
Descrirbe how to enable autoscaling rules
- Navigate to App Service plan > ‘Scale out’
- Select the ‘Custom autoscale’ option
- Add conditions
- Add rules - where required