是否Azure角色需要在终止前清理本地资源? [英] Does Azure role need to clean up local resources before terminating?

查看:111
本文介绍了是否Azure角色需要在终止前清理本地资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假如我Azure角色被告知,这将很快结束,技术上本身后可以清理本地资源(如临时文件)。是否应该这样做?

Suppose my Azure role is notified that it will be terminated soon and technically can clean up local resources after itself (temporary files for example). Should it do so?

我不要求了解是否有人会看到我剩余的临时文件 - 多么我的角色可以是一个有礼貌Azure的好公民。

I'm not asking about whether someone will see my leftover temporary files - just how my role can be a polite good Azure citizen.

是否有意义的角色来清理本地资源,或者它应该只是离开的一切,是什么?

Does it make sense for the role to clean up local resources or should it just leave everything as is?

推荐答案

像斯图尔特说,没有理由做任何本地存储的清理。你要么离开它为自己在将来使用(这是不能保证),或者你有本地存储清理自动将您的角色实例关闭后。

Like Stuart said, there's no reason to do any local storage cleanup. You either leave it for yourself to use in the future (which is not guaranteed), or you have the local storage cleaned up automatically after your role instance shuts down.

您有什么的要停机期间做的就是relesae一滴租约,关闭打开的会话,关闭数据库连接等,你不会有这样的机会,如果客户操作系统(或主机OS)崩溃,但你总是希望在可能的情况来处理正常关闭。

What you do want to do during shutdown is relesae blob leases, close open sessions, shut down database connections, etc. You won't have this opportunity if the Guest OS (or Host OS) crashes, but you always want to handle graceful shutdowns when possible.

这篇关于是否Azure角色需要在终止前清理本地资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆