How to configure auto scaling for a Cloud Service (classic) in the portal
Cloud Services (classic) is now deprecated for new customers and will be retired on August 31st, 2024 for all customers. New deployments should use the new Azure Resource Manager based deployment model Azure Cloud Services (extended support).
Conditions can be set for a cloud service worker role that trigger a scale in or out operation. The conditions for the role can be based on the CPU, disk, or network load of the role. You can also set a condition based on a message queue or the metric of some other Azure resource associated with your subscription.
This article focuses on Cloud Service (classic). When you create a virtual machine (classic) directly, it is hosted in a cloud service. You can scale a standard virtual machine by associating it with an availability set and manually turn them on or off.
You should consider the following information before you configure scaling for your application:
Scaling is affected by core usage.
Larger role instances use more cores. You can scale an application only within the limit of cores for your subscription. For example, say your subscription has a limit of 20 cores. If you run an application with two medium-sized cloud services (a total of 4 cores), you can only scale up other cloud service deployments in your subscription by the remaining 16 cores. For more information about sizes, see Cloud Service Sizes.
You can scale based on a queue message threshold. For more information about how to use queues, see How to use the Queue Storage Service.
You can also scale other resources associated with your subscription.
To enable high availability of your application, you should ensure that it is deployed with two or more role instances. For more information, see Service Level Agreements.
Auto Scale only happens when all the roles are in Ready state.
Where scale is located
After you select your cloud service, you should have the cloud service blade visible.
On the cloud service blade, on the Roles and Instances tile, select the name of the cloud service.
IMPORTANT: Make sure to click the cloud service role, not the role instance that is below the role.
Select the scale tile.
You can configure scale settings for a role with either two modes manual or automatic. Manual is as you would expect, you set the absolute count of instances. Automatic however allows you to set rules that govern how and by how much you should scale.
Set the Scale by option to schedule and performance rules.
- An existing profile.
- Add a rule for the parent profile.
- Add another profile.
Select Add Profile. The profile determines which mode you want to use for the scale: always, recurrence, fixed date.
After you have configured the profile and rules, select the Save icon at the top.
The profile sets minimum and maximum instances for the scale, and also when this scale range is active.
Always keep this range of instances available.
Choose a set of days of the week to scale.
A fixed date range to scale the role.
After you have configured the profile, select the OK button at the bottom of the profile blade.
Rules are added to a profile and represent a condition that triggers the scale.
The rule trigger is based on a metric of the cloud service (CPU usage, disk activity, or network activity) to which you can add a conditional value. Additionally you can have the trigger based on a message queue or the metric of some other Azure resource associated with your subscription.
After you have configured the rule, select the OK button at the bottom of the rule blade.
Back to manual scale
Navigate to the scale settings and set the Scale by option to an instance count that I enter manually.
This setting removes automated scaling from the role and then you can set the instance count directly.
- The scale (manual or automated) option.
- A role instance slider to set the instances to scale to.
- Instances of the role to scale to.
After you have configured the scale settings, select the Save icon at the top.
Submit and view feedback for