This topic has not yet been rated - Rate this topic

How to Scale Applications by Increasing or Decreasing the Number of Role Instances

Updated: June 13, 2011

Windows Azure allows you to scale your hosted service to meet capacity demands by increasing or decreasing the number of role instances that are running as part of your hosted service. To increase or decrease the number of role instances, you must modify the Instances element within the service configuration file.

ImportantImportant
For a hosted service to qualify under the Windows Azure SLA a role must be deployed with two or more role instances. For more information, see Service Level Agreements.

  1. Open the ServiceConfiguration.cscfg file for your hosted service in the text editor.

  2. Locate the Instances element of the role for which you are changing the number of instances. Update the value of the count attribute to reflect the new number of instances of the role.

    …
        </ConfigurationSettings>
        <Instances count="1" />
        <Certificates>
    ---
    

    noteNote
    Increasing the number of instances of a running role increases the compute hours that are billed. For more information on how computer hours are billed, see see Windows Azure Billing Basics.

  3. Save the ServiceConfiguration.cscfg file.

  1. Log on to the Windows Azure Platform Management Portal.

  2. In the upper portion of the navigation pane, click Hosted Services.

  3. In the services and deployments window, expand the subscription that contains the hosted service for which you are changing the number of the role instances.

  4. Expand the hosted service for the deployment.

  5. Click the deployment for which you are changing the configuration.

  6. On the ribbon, in the deployments section, click Configure.

    Configure button on the ribbon

  7. On the Configure Deployment dialog click Browse. Navigate to the location of the service configuration file, select the configuration file, and click Open.

  8. Click OK.

noteNote
It is possible to update the instance count by editing the configuration in the portal. It is recommended that you do this only during testing of a hosted service. If you do not make the change in the service configuration file of your Windows Azure project, the next time you package and deploy the hosted service, the number of role instances will revert to the previous value.

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
For details on the events that fire when scaling a role up or down...