Azure role instance count using events only RRS feed

  • Question

  • 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 RoleEnvironment.Changing fires.

    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?


    [IMG] http://mahaman.baderi/free/msdnaa/certification.png

    mardi 31 juillet 2012 11:47