1.3: Create Azure App Service web apps - Scale apps in Azure App Service Flashcards

1
Q

What is autoscaling?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Azure App Service autoscaling

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe autoscaling rules

A

Autoscaling makes decisions based upon rules you define.

A rule is a threshold for a metric - which once crossed triggers an autoscale event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When should you consider autoscaling?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe options for autoscale conditions

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the metrics you can use for autoscale rules

A
  • CPU Percentage
  • Memory Percentage
  • Disk Queue Length
  • Http Queue Length
  • Data In
  • Data Out
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In autoscaling what is a ‘time grain’?

A

A time grain in the period of time over which the values retrieved for a metric for all instances are aggregated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In autoscaling what is a ‘time aggregation’?

A

The aggregated value generated for a time grain is known as the time aggregation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In autoscaling what aggregation options are available?

A
  • Average
  • Minimum
  • Maximum
  • Sum
  • Last
  • Count
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In autoscaling what is a ‘duration’?

A

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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe autoscale actions

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

sDescribe autoscale action cool down period

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why should you pair autoscale rules?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe autoscaling when using multiple rules

A

When scaling out any rule will trigger it.

When scaling in all rules must be satisfied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Descrirbe how to enable autoscaling rules

A
  1. Navigate to App Service plan > ‘Scale out’
  2. Select the ‘Custom autoscale’ option
  3. Add conditions
  4. Add rules - where required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe best practice autoscale concepts

A

An autoscale setting has a maximum, minimum, and default value of instances.

An autoscale job always reads the associated metric to scale by, checking if it has crossed the configured threshold for scale out or scale-in.

All thresholds are calculated across all instances.

All autoscale successes and failures are logged to the Activity Log. You can then configure an activity log alerts.

17
Q

rDescribe best practice for min/max values

A

Keep an adequate margin between the maximum and minimum instance counts, which are inclusive.

18
Q

Describe best practice for diagnostic metrics

A

Choose among Average, Minimum, Maximum and Total as a metric to scale by.

The most common statistic is Average.

19
Q

Describe best practice for thresholds

A

Choose an adequate margin between the scale out and in thresholds.

As an example, consider the following better rule combination:

  • Increase instances by 1 count when CPU% >= 80
  • Decrease instances by 1 count when CPU% <= 60

It’s much better than

  • Increase instances by 1 count when CPU% >= 80
  • Decrease instances by 1 count when CPU% <= 80

Because it stops “flapping” situations, where scale-in and scale out actions continually go back and forth.
Keep this behavior in mind when you choose the same thresholds for scale out and in.

20
Q

Describe the default instance count

A

It’s the value autoscale scales your service to that count when metrics aren’t available.
Ensure it’s a value that’s safe for your workloads.

21
Q

Describe autoscale notifications

A

Autoscale will post to the Activity Log if any of the following conditions occur:

  • Autoscale issues a scale operation
  • Autoscale service successfully completes a scale action
  • Autoscale service fails to take a scale action.
  • Metrics aren’t available for autoscale service to make a scale decision.
  • Metrics are available (recovery) again to make a scale decision.