liveBook · Manning

Autoscaling

As explained in Microsoft Azure in Action

The act of decreasing a virtual machine's size to provide fewer computing resources.

A service that handles a quiet Tuesday may struggle during a holiday sale. Autoscaling adjusts resources as demand changes, helping maintain performance at busy times without keeping peak capacity running all the time. section 10.4.4 section 11.1.1

Scaling down is one possible change, but it is not the same thing as autoscaling. Making one virtual machine smaller is vertical scaling down; adding or removing machines is horizontal scaling. Autoscaling means those adjustments happen in response to workload or configured thresholds rather than requiring each change by hand. section 3.5.1 section 1.3.1

What changes depends on the Azure service:

  • For Virtual Machine Scale Sets, estimate average and peak workloads, then set scaling thresholds and minimum and maximum instance counts. App Services also support autoscaling. section 1.3.1
  • For Azure SQL Database, performance levels can rise with demand and fall when demand eases, reducing the need to scale the database manually. section 10.4.4
  • For Azure Cosmos DB, throughput adjusts with workload up to a configured maximum. Set that limit explicitly: a default based on existing throughput might not suit either performance or budget. section 11.1.1
C:/> az cosmosdb update --name alpacacosmosdbaccount 
--resource-group AlpacaRG --capabilities EnableAutoScale 
--max-throughput 10000

This Azure CLI example enables Cosmos DB autoscaling and caps throughput at 10,000 request units per second. section 11.1.1

For a busy online shop, a Cosmos DB MongoDB collection can also use autoscale throughput with a specified maximum. The trade-off is worth watching: throughput can increase during a sales rush, and so can the bill. Check the limit against both the expected traffic and the budget. section 11.2.1 section 11.1.3

How Microsoft Azure in Action covers it

How deep it goes
Explains scaling directions, thresholds, instance limits, and Cosmos DB throughput caps; does not detail the underlying scaling mechanism.
Examples
Uses holiday shopping traffic, a Cosmos DB Azure CLI command, and database demand during major sales.
What it assumes
Introduces scalability through server-capacity and seasonal-traffic problems, then distinguishes changing VM size from changing VM count.
What you can do after
Operate/configure it by setting Cosmos DB autoscale and an explicit maximum throughput, while accounting for possible cost spikes.
How it connects
Connects autoscaling to vertical scaling, horizontal scaling, Virtual Machine Scale Sets, provisioned throughput, and request units.

Also explained in

Compare how 7 books explain autoscaling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.