In my Azure role I need to be able to query the current number of instances at any time.
I don't have any internal endpoints, so I can't use
Role.Instances. I can use Management API, but it's relatively time consuming and querying it sometimes results in protocol timeout errors and I'd prefer to not deal with timeouts.
Looks like there's
RoleEnvironment.Changing event that can contain RoleEnvironmentTopologyChange class objects that reflects which role changes the instance count. This would be optimal for me - I wouldn't need to do any external calls, just store the new instance
count when it changes, so no overhead and no timeouts. Yet I can't find whether it's possible to find the new instance count when
Is it possible to detect the changes in role instance count and the actual number of instances using only
RoleEnvironment.Changing or similar events in Azure?
Microsoft réalise une enquête en ligne pour comprendre votre opinion sur le site Web de Msdn. Si vous choisissez de participer, l’enquête en ligne vous sera présentée lorsque vous quitterez le site Web de Msdn.