Search code examples
azureazure-role-environment

Azure - How is the Data from the RoleEnvironment.CurrentRoleInstance.Role.Instances Generated?


I have a question, some of my code is often iterating over the RoleEnvironment.CurrentRoleInstance.Role.Instances collection.

How is this data collected? Is it refreshed frequently? is it always live data?

I am still working in the developer emulated environment so i'm not able to deduce this so far


Solution

  • I'm not sure how the library fetched this data but I assume it's reading from C:\Config... on the instances (remote desktop into a server and go wild ;-)). If that assumption is correct, the values will be retrieved from the system only once for every RoleEnvironmentChanging event, that is: at startup and when config/topology changes. But like I said: those are assumptions.