Azure autoscaling

Once again, remember that availability can also be defined as the proportion of available objects (services) in the total number of objects (services). 

Immediately the question arises, does the availability rate increase as the number of available objects increases and if so, how do I achieve this? To answer the question, yes.

It increases the level of availability, and with the Azure autoscaling feature, there is also a platform-based way to do it.

Scaling is a complex topic because it can occur in two ways. With vertical scaling, I do not increase the number of instances of a service but migrate the service to the next higher performance level. With horizontal scaling instead, I increase the rule-based number of instances.

In summary, while vertical scaling only influences the performance of your application, horizontal scaling can also affect the availability of the application.

Let's take a closer look at horizontal scaling. As I've already written, horizontal scaling is rule-based. But to be honest, that's just part of the reality. Before the autoscale engine can work, you need a complete configuration called autoscale settings, which consists of more than just rules.

Just take a look at the following diagram:

What can you see? The highest element of the configuration is the so-called Autoscale Settings. An autoscale setting is read by the autoscale engine to determine how to scale.

The autoscale settings contain one or more profiles. An autoscale profile is a combination of:

  • Capacity settings: Capacity settings specify the minimum, maximum, and default values for the number of instances
  • Rules: Each rule includes a trigger (time or metric) and a scale action (up or down)
  • Recurrence: Recurrence indicates when the autoscale engine should put a profile into effect

Let's go back to the topic of rules. As you have read, a rule contains a trigger (an action) that triggers scaling. The trigger is based on either a timestamp (for example, Saturdays at 6:00 PM) or a metric (for example, CPU usage).

Metrics are usually provided by the Azure Monitor service. For a list of available metrics for the autoscaling section, see the following table:

Metric name

Unit

Processor(_Total)% Processor Time

Percent

Processor(_Total)% Privileged Time

Percent

Processor(_Total)% User Time

Percent

Processor Information(_Total)Processor Frequency

Count

SystemProcesses

Count

Process(_Total)Thread Count

Count

Process(_Total)Handle Count

Count

Memory% Committed Bytes In Use

Percent

MemoryAvailable Bytes

Bytes

MemoryCommitted Bytes

Bytes

MemoryCommit Limit

Bytes

MemoryPool Paged Bytes

Bytes

MemoryPool Nonpaged Bytes

Bytes

PhysicalDisk(_Total)% Disk Time

Percent

PhysicalDisk(_Total)% Disk Read Time

Percent

PhysicalDisk(_Total)% Disk Write Time

Percent

PhysicalDisk(_Total)Disk Transfers/sec

CountPerSecond

PhysicalDisk(_Total)Disk Reads/sec

CountPerSecond

PhysicalDisk(_Total)Disk Writes/sec

CountPerSecond

PhysicalDisk(_Total)Disk Bytes/sec

BytesPerSecond

PhysicalDisk(_Total)Disk Read Bytes/sec

BytesPerSecond

PhysicalDisk(_Total)Disk Write Bytes/sec

BytesPerSecond

PhysicalDisk(_Total)Avg. Disk Queue Length

Count

PhysicalDisk(_Total)Avg. Disk Read Queue Length

Count

PhysicalDisk(_Total)Avg. Disk Write Queue Length

Count

LogicalDisk(_Total)% Free Space

Percent

LogicalDisk(_Total)Free Megabytes

Count

 

Where can I use autoscaling? Currently, autoscaling is available as a built-in option for the following services:

  • Azure Cloud Services
  • Azure Service Fabric (scaling of SF clusters)
  • Azure App Services (without Azure Functions)
  • Azure VMs

Azure Functions (actually a part of Azure App Services) does not need the autoscaling build-in option because it scales automatically when needed. The autoscaling build-in option on Azure VMs is a special case because they only work in a so-called VM Scale Set.

A VM Scale Set can, by default, contain up to 100 identical VMs. But if you set the singlePlacementGroup property to false when you create the VM Scale Set, you can use up to 1,000 identical VMs.

With the help of autoscaling, you now have the option to automatically add VMs to your scale set until the limits are reached. The deployment takes place within a few minutes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.151.45