Handling changes to the configuration and topology of a Cloud Service

A Microsoft Azure Cloud Service has to detect and respond to changes to its service configuration. Two types of changes are exposed to the service: changes to the ConfigurationSettings element of the ServiceConfiguration.cscfg service configuration file and changes to the service topology. The latter refers to changes in the number of instances of the various roles that comprise the service.

The RoleEnvironment class exposes six events to which a role can register a callback method to be notified about these changes:

  • Changing
  • Changed
  • SimultaneousChanging
  • SimultaneousChanged
  • Stopping
  • StatusCheck

The Changing event is raised before the change is applied to the role. For configuration ...

Get Microsoft Azure Development Cookbook Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.