SALES: 1-800-867-1380

RoleInstance.UpdateDomain Property

Updated: December 6, 2013

Gets an integer value that indicates the update domain in which the role instance is running.

Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

public abstract int UpdateDomain { get; }

Property Value

Type: System.Int32

An integer value that represents the update domain in which the role instance is running.

The update domain is related to the operation of upgrading a hosted service in the Azure Management Portal. When two or more role instances are running, they are assigned separate update domains (also referred to as an upgrade domain in the service model).

Azure upgrades one domain at a time, stopping the role instances running within the upgrade domain, upgrading them, bringing them back online, and moving on to the next domain. By stopping only the instances running within the current upgrade domain, Azure ensures that an upgrade takes place with the least possible impact to the running hosted service.

You can specify the number of upgrade domains to use in the ServiceDefinition.csdef file. The default number of upgrade domains is 5. For more information, see Azure Service Definition Schema

The following code example shows how to retrieve the upgrade domain in which role instances are running:


foreach (var role in RoleEnvironment.Roles) 
{
   foreach (var roleInstance in role.Value.Instances)      
   {
      Trace.WriteLine("Role instance update domain: " + roleInstance.UpdateDomain, "Information");
   }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft