views:

38

answers:

2

Hi All,

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

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?

Thanks

Upul

+1  A: 

Web servers are do allow simultaneous connections. There should not be any problem in opening one's unless the application logic prevents opening multiple connections for same client. To further clarify my point, if you require login before downloading resources and your application does not allow multiple simultaneous logins, then you will get stuck there. There are applications which do not allow lot of connections from same source for security reasons.

Tushar Tarkas
+1  A: 

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.

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.

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.

thomasrutter