我可以打开到HTTP服务器的多个连接吗? [英] Can I Open Multiple Connections to a HTTP Server?

查看:89
本文介绍了我可以打开到HTTP服务器的多个连接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个小软件组件,以便从Web服务器(IIS)下载资源。

I’m writing a small software component in order to download resources from a web Server (IIS).

但似乎该系统的性能是不可接受的。现在我计划通过生成多个线程来增加与Web服务器的连接数。

But it seems like that system's performance is not acceptable. Now I’m planning to increase the number of connection to the web server by spawning multiple threads.

我的问题是,我可以通过使用多个线程来提高性能吗?更多超剂量网络服务器允许我产生几个同时连接?

My question is, can I improve performance by using multiple threads? More over dose web server allow me to spawning several simultaneous connections?

谢谢

Upul

推荐答案

所有正确配置的Web服务器都应该能够处理来自同一源的多个连接。例如,这允许浏览器一次从页面下载两个图像。

All properly configured web servers should be able to handle multiple connections from the same source. This allows, for example, a browser to download two images from a page at once.

某些服务器可能会对它将接受的并发连接数设置上限一个客户,但这通常是一个很高的数字。最多使用6个连接通常是安全的。

Some servers may place an upper limit on the number of concurrent connections it will accept from one client, but this will usually be a high number. Using up to 6 connections is normally safe.

至于它是否真的会提高性能,这取决于你的情况。如果您与Internet主干网的连接速度非常快,并且发现从远程服务器获得的速度没有利用连接的速度,那么在许多情况下多线程可以提高速度。如果速度已经超出了连接到互联网的速度或远程服务器的连接速度,那么它就无法做任何事情。

As for whether it will actually improve performance, that depends on your situation. If you have a very fast connection to an internet backbone, and find that the speed you are getting from the remote server is not taking advantage of the speed of your connection, then in many situations multithreading can improve speed. If the speed is already maxing out the speed of your connection to the internet, or the connection of the remote server, then it can't do anything.

这篇关于我可以打开到HTTP服务器的多个连接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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