Re: downloading a single file using multiple threads



Willy Denoyette [MVP] <willy.denoyette@xxxxxxxxxx> wrote:

<snip>

I know that down-load managers claim to work over HTTP, but that
doesn't mean they support multi-part parallel request handling over
the same or multiple connections, I don't even know if the protocol
allows you to issue new range request when you have a range requests
pending (on the same logical connection).

I'm not sure what you mean by a "logical" connection, but you can
certainly do it over multiple "real" TCP connections.

There is no theoretical reason why it wouldn't work. There's
nothing about HTTP that requires servers to restrict their
communications to a given client to a single connection, and
there's nothing about HTTP that stipulates that an HTTP server
needs to coordinate communications on independent connections. If
on one connection the client asks for the first megabyte and on a
second connection the same client asks for the second megabyte,
then if the server is capable of servicing both requests at the
same time, there's no reason the client can't wind up receiving
both the first and second megabytes in parallel.

Agreed, but what's the advantage in a simple client server scenario?
With simple I mean a simple PC connected over a dedicated LAN to an
HTTP server.

Agreed, it's not useful in that case.

And of course if the HTTP server is configured to throttle the
transfer for each connection, it is often also configured to
disallow multiple connections from the same client IP address.

They better do ;-)

Most shouldn't, IMO. If I connect to the BBC and download the home page
which has multiple small images in, it makes sense to use a few
connections to get those images in parallel, given that a lot of the
time will be taken by latency rather than bandwidth.

Disallowing multiple connections from the same IP address to fetch the
same file would make sense, or having a limit on the number of
connections to allow from each IP address.

<snip>

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages