为什么Azure的不是我的两个实例中的一个调度的HTTP请求? [英] Why is Azure not dispatching HTTP requests on one of my two instances?

查看:136
本文介绍了为什么Azure的不是我的两个实例中的一个调度的HTTP请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个实例的Azure的Web角色。这两种情况都是准备好了 - 运行好

I have an Azure web role with two instances. Both instances are "ready" - running okay.

在我的桌面我有相同的程序的四个实例同时运行,并击中HTTP请求的Web角色URL。然而,根据记录所有的请求被分派到实例0只。我需要请求分派到两个实例来测试并发操作。

On my desktop I have four instances of the same program running simultaneously and hitting the web role URL with HTTP requests. Yet according to the logs all requests are dispatched to instance 0 only. I need requests to be dispatched to both instances to test concurrent operation.

为什么不请求分派到二审,如何让他们出动呢?

Why are requests not dispatched to the second instance and how do I make them dispatched there?

推荐答案

貌似这个行为是由于IIS保持活动(< system.webServer>< httpProtocol allowKeepAlive =真方式> 由于保活一旦客户端已经被它卡与实例的实例服务

Looks like this behavior is due to IIS "keep alive" (<system.webServer><httpProtocol allowKeepAlive="true">. Because of "keep alive" once a client has been served by an instance it gets stuck with that instance.

禁用保持删除了与现在的要求得到所有实例或多或少随机。 MSDN说禁用保持活动可能会降低性能,但测试并发操作的缘故会好起来的。

Disabling "keep alive" removes that and requests now get to all instances more or less randomly. MSDN says disabling "keep alive" may reduce performance but for the sake of testing concurrent operation it would be okay.

这篇关于为什么Azure的不是我的两个实例中的一个调度的HTTP请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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