What is ignoreRoleInstanceStatus setting in Windows Azure?

ignoreRoleInstanceStatus is described in WebRole and WorkerRole Schema as below

https://msdn.microsoft.com/en-us/library/windowsazure/gg557553.aspx 

Web Role:

ignoreRoleInstanceStatus

boolean

Optional. When the value of this attribute is set to true, the status of a service is ignored and the endpoint will not be removed by the load balancer. The default value is false.

Setting this value to true useful for debugging busy instances of a service.

An endpoint can still receive traffic even when the role is not in a Ready state.

 

Worker Role:

ignoreRoleInstanceStatus

boolean

Optional. When the value of this attribute is set to true, the status of a service is ignored and that the endpoint will not be removed by the load balancer. The default value is false.

Setting this value true useful for debugging busy instances of a service.

Usage:

<InputEndpoints >
        <InputEndpoint certificate="<certificate-name>" ignoreRoleInstanceStatus="[true|false]" name="<input-endpoint-name>" protocol="[http|https]" localPort="<port-number>" port="<port-number>" />
    </InputEndpoints>
    <Endpoints>
      <InputEndpoint certificate="<certificate-name>" ignoreRoleInstanceStatus="[true|false]" name="<input-endpoint-name>" protocol="[http|https|tcp]" localPort="<port-number>" port="<port-number>" />
      <InternalEndpoint name="<internal-endpoint-name>" protocol="[http|tcp]" port="<port-number>">
         <FixedPort port="<port-number>"/>
         <FixedPortRange min="<minium-port-number>" max="<maximum-port-number>"/>
      </InternalEndpoint>
    </Endpoints>

 

When when ignoreRoleInstanceStatus is set to TRUE, the VM instance always stuck with LoadBalancer without consideration of Instance Status. So in some cases when VM Instance generate Busy status, the LoadBalancer to design to remove the VM by detaching the VM internal IP address from its list. Using  ignoreRoleInstanceStatus is TRUE, the LoadBalancer will override the VM Status. 

 

To test it, I have used my previous blog info, in which I used Powershell commands to take a specific Azure VM instance out of Load Balancer:

Windows Azure Troubleshooting - Taking specific Windows Azure Instance offline

Here is what I did:

1. Created a sample Web Role and included ignoreRoleInstanceStatus as TRUE in the Service Definition as below and deployed to Windows Azure Cloud:

 <?xml version="1.0" encoding="utf-8"?>
 <ServiceDefinition name="TestignoreRoleInstanceStatusProj" xmlns="https://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
 <WebRole name="WebRole1" vmsize="Small">
 <Sites>
 <Site name="Web">
 <Bindings>
 <Binding name="Endpoint1" endpointName="Endpoint1" />
 </Bindings>
 </Site>
 </Sites>
 <Endpoints>
 <InputEndpoint name="Endpoint1" protocol="http" port="80" ignoreRoleInstanceStatus="true" />
 </Endpoints>
 <Imports>
 <Import moduleName="Diagnostics" />
 <Import moduleName="RemoteAccess" />
 <Import moduleName="RemoteForwarder" />
 </Imports>
 </WebRole>
 </ServiceDefinition>

2. After the service is deployed to Windows Azure, RDP to the instance and run the Powershell script as below to kick VM instance "Busy" status:

3. Keep an eye on Windows Azure Portal to see if the Role Status changes... even after 10 minutes the role status did not changed as below

Also I tried opening the website in my browser which was keep working so I could confirm that yes, the VM instance was stick to LoadBalancer.

 

So I was able to prove that this  ignoreRoleInstanceStatus property is useful to keep the instance stick to LoadBalancer in any state, however this property needs to set in Service Definition and to update it i would need to re-deploy the application which is trouble.