如何在我的 DevAppFabric 中模拟 Windows Azure VM 崩溃
我们需要高瞻远瞩,我们的应用程序需要扩展才能在 Windows Azure 平台上运行。但如何模拟运行我的应用程序的虚拟机之一的崩溃?
我想看看(调试)我的应用程序在这种环境中的行为如何。
We need to think big and our applications need to scale in order to work on the Windows Azure Platform. But how do I simulate a crash of one of the VMs running my application?
I want to see (debug) how my application behaves in such environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
模拟故障很简单(只需调用Thread.Abord());但它不会告诉你太多关于你的设计的信息。
特别是,调试有点无关紧要,因为每当虚拟机停止工作时,就没有什么可以观察的了(也没有什么可以调试的了)。您应该假设您的应用程序可能在执行的任何时刻突然停止。
由于您无法实际观察到执行中断可能导致的所有微妙数据损坏,因此您应该考虑持久性设计从一开始就能够应对此类问题(幂等进程在可能的情况下会提供很大帮助)。
Simulating faults is simple (just call Thread.Abord()); but it won't tell you much about your design.
In particular, debugging is a bit irrelevant, because whenever VM stop working there is nothing more to observe (nothing more to debug too). You should just assume that your app is likely to be abruptly stopped at any point of its execution.
Since, you cannot realistically observe all the subtle data corruptions that could be caused by interrupted executions, you should think to your persistence design to be resilient to such problem from the start (idempotent processes help a lot when possible).