本文介绍了如何测试在Windows Azure中的多个Web角色实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我已经部署了一个MVC3应用2 Azure的Web角色实例,但我很困惑,我怎么能测试出这些实例失败之一的可能性

Background: I've deployed an MVC3 application to 2 Azure Web Role instances, but I'm confused as to how I can test out the possibility of one of these instances failing.

有没有办法,我可以测试,以确保当我的实例之一是脱机我的​​Web角色code可以无缝的方式?

Is there a way that I can test to ensure that my Web Role code works seamlessly when one of my instances is taken offline?

我可以手动停止其中之一吗?或以某种方式配置负载平衡器所有流量强制的一台服务器?

Can I manually stop one of them? Or somehow configure the load balancer to force all traffic to one of the servers?

谢谢!

推荐答案

如果您启用了您的实例RDP访问,可以进行从负载平衡器甚至当实例运行健康很容易删除一个或多个实例,而无需编写任何一行code。你只需要RDP到您的实例,然后使用PowerShell脚本从负载均衡器采取实例了。在我的博客之后我所描述的具体步骤:

If you have RDP access enabled to your instances you can very easily remove one or more instance out from LoadBalancer even when the instance is running healthy without writing any line of code. You just need to RDP to your instance and then use PowerShell scripts to take the instance off from loadbalancer. In my following blog I have described the exact procedure:

http://blogs.msdn.com/b/avkashchauhan/archive/2012/01/27/windows-azure-troubleshooting-taking-specific-windows-azure-instance-offline.aspx

上面的细节也有助于从总共M个实例中除去N个实例运行负载测试。

The above details also help to run load testing by removing N instances from total M instances .

这篇关于如何测试在Windows Azure中的多个Web角色实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 09:50