Refreshing Data on all Azure Instances

后端 未结 2 851
感动是毒
感动是毒 2021-02-09 14:29

What is the best way to refresh the data in all my Azure instances?

I have several instances each running the same web role. On role startup data is read from blob stor

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-09 15:07

    I think one possible way you could do this is to use a setting (e.g. a timestamp) in a configuration setting - you can then programmatically update the configuration and use the RoleEnvironment.Changing event to do monitor for the change on all your instances - http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.changing.aspx

    If you do this make sure you intercept the event in all your roles - and make sure you parse the changes (looking for Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentConfigurationSettingChange) and return false to the Cancel parameter to prevent your instances from being rebooted.

提交回复
热议问题