How do I detect unexpected worker role failures and reprocess data in those cases?

后端 未结 4 1389
梦谈多话
梦谈多话 2021-01-21 23:01

I want to create a web service hosted in Windows Azure. The clients will upload files for processing, the cloud will process those files, produce resulting files, the client wil

4条回答
  •  渐次进展
    2021-01-21 23:37

    Your role's OnStop() could be part of the solution, but there are some circumstances (hardware failure) where it won't get called. To cover that case, have your OnStart() mark everything with the same RoleInstanceID as abandoned, because it wouldn't be called if anything was still happening. (You can observe that Azure reuses its role instance IDs, luckily.)

提交回复
热议问题