简体   繁体   English

在Azure模拟器中测试多个Web角色实例

[英]Test multiple web role instances in the Azure emulator

I have a web role that will run on multiple instances on Azure. 我有一个Web角色,它将在Azure的多个实例上运行。 It is an MVC3 app that allows users to upload multiple image files. 这是一个MVC3应用程序,允许用户上传多个图像文件。 I'm using Plupload (http://www.plupload.com/) for uploads and the files are sent on chunks to the server. 我正在使用Plupload(http://www.plupload.com/)进行上传,并且文件以块的形式发送到服务器。

I would like to test how this works on multiple instances. 我想测试一下如何在多个实例上工作。 So I configured my cloud service to start 2 instances of my web role and put a breakpoint in my Upload action. 因此,我将云服务配置为启动2个Web角色实例,并在我的“上载”操作中添加了一个断点。 The problem is that all my requests are served by the first instance of the web role. 问题是我的所有请求都由Web角色的第一个实例提供。 I would like the requests to be balanced (but this could be an issue with how Plupload handles the upload). 我希望请求达到平衡(但这可能是Plupload如何处理上传的问题)。 Is there any way to simulate that behavior? 有什么方法可以模拟这种行为?

I have to say that the load balance of the local emulator was not that "balanced". 我不得不说,本地仿真器的负载平衡不是“平衡”的。 You need to try many times to ensure that it does route your request to all instances. 您需要尝试多次以确保它确实将您的请求路由到所有实例。 My experience is that, even though just have 2 instances and press F5 to refresh the same page, you need about 10 - 15 times to make sure it's balanced to another instance. 我的经验是,即使只有2个实例并按F5刷新同一页面,您也需要大约10到15次才能确保它与另一个实例保持平衡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Azure中的辅助角色部署Web角色 - Deploy Web Role from Worker Role in Azure Azure Web角色在部署时开始 - Azure web role start on deploy Windows Azure上具有多个实例的会话变量 - Session variables with multiple instances on windows Azure Azure Web角色-长时间运行的请求(负载均衡器超时?) - Azure Web Role - Long Running Request (Load Balancer Timeout?) 在Windows Azure Web角色中禁用/关闭URL重写模块 - Disable/Turn Off URL Rewrite Module in Windows Azure Web Role Azure负载测试:启动多个实例运行时 - Azure Load Testing: Spin up multiple instances runtime 最佳实践:在Windows Azure中使用具有多个实例的会话 - Best Practices: Using Session in Windows Azure with multiple instances 在Azure Web角色中托管的ASP.NET MVC3应用程序中是否需要SessionStateModule? - Do I need SessionStateModule in my ASP.NET MVC3 application hosted in Azure web role? 将ASP.NET MVC 3 Web角色添加到Windows Azure项目时出现冲突的版本错误 - Conflicting versions error adding ASP.NET MVC 3 Web Role to Windows Azure project 如何设置新的成员资格和会话提供程序以在Windows Azure中运行? 使用MVC3和Web角色 - How to set up new Membership and Session providers to run in Windows Azure? Using MVC3 and Web Role
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM