寻找解决方案,以限制HTTP请求到多台主机有什么可以同时最大限度地提高吞吐量来提供有什么、吞吐量、多台、限度

2023-09-06 21:55:58 作者:我知道你会找到我

在它通过HTTP下载许多文件并行的应用程序,我想使网络连接的最佳利用,而不使其超越了它的极限,并获得超时。

In an application which downloads many documents over http in parallel, I would like to make optimal use of the network connection, without pushing it beyond its limits and getting timeouts.

我想这个,是因为有拥塞控制。也许一个逐渐增加请求频率,直到网络连接似乎负担过重,随后在请求频率略有下降,随后连续监测,以调整的速率。

I am thinking this has to do with congestion control. Perhaps a gradual increase in request frequency, until the network connection appears to be overburdened, followed by a slight drop in request frequency, followed by continuous monitoring to adjust the rate.

我有麻烦的一点是如何最好地检测出不堪重负的网络状况。如果我是衡量发出请求和响应的开始之间的时间,这将有效地给我一个往返时间。如果此时间的平均显著增加那么我们有一个负担过重的网络。我不知道显著应该是指在这种情况下。

The bit I'm having trouble with is how best to detect the overburdened network condition. If I were to measure the time between issuing a request and the beginning of the response, that would effectively give me a round trip time. If the average of this time increases significantly then we have an overburdened network. I wonder what 'significantly' should mean in this case.

这是否健全有关的权利?你可以摆脱任何更多的光对这个问题?任何人在那里codeD这种情况?

Does this sound about right? Can you shed any more light on this problem? Anyone out there coded this scenario?

我已标记的这个问题,.NET,因为这是我使用的框架,如果有框架的支持对于这种情况,那么我想知道。

I have tagged this question .net because that is the framework I'm using, and if there is framework support for this scenario, then I'd like to know.

修改 为了澄清,我说的多台主机在这里,应用程序只有一个实例。我已经有一个适当的系统,以避免到同一服务器(请求交付端到端)同时连接,因此,问题不在于如何饱和管(我知道如何做到这一点),但如何的最好的限制请求,以避免超时错误。

EDIT To clarify, I am talking about many hosts here, and only one instance of the application. I already have in place a system to avoid simultaneous connections to the same server (requests are delivered end to end), so the question is not so much how to saturate the pipe (I know how to do this), but how best to limit requests so as to avoid timeout errors.

推荐答案

由于海底总动员。我实现你的监视带宽建议用移动平均线。我用这个值来调整一个价值重估未处理请求presenting目标数量。我编排了新的要求,如发行以倾向于这种移动的目标。

Thanks Nemo. I implemented your suggestion of monitoring bandwidth with a moving average. I use this value to adjust a value representing target number of outstanding requests. I orchestrate the issuing of new requests such as to tend towards this moving target.

有人还建议使用限制带宽的代理服务器。

Someone also suggested using a bandwidth-limiting proxy.

 
精彩推荐
图片推荐