Re: downloading a single file using multiple threads
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Wed, 28 Mar 2007 21:30:27 +0200
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message news:MPG.2074c5b62953c42a98da42@xxxxxxxxxxxxxxxxxxxxxxx
Willy Denoyette [MVP] <willy.denoyette@xxxxxxxxxx> wrote:Sorry, I'm talking about connections in terms of ISO layers, a logical connection is an end to end socket connection, a connection at the session layer (HTTP is operating at this layer - and it's called a session). I would call a "real connection", a TCP connection, that is a connection at the transport layer (connected to a 'port' in TCP/IP terms), say a connection to www.contoso.com port 80.
<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.
Agreed, you can have multiple range requests on separate "real connections" or "logical" (same or different port, different sockets), however, I'm not sure you can have overlapping range requests on a *single* an HTTP "session".
a connection with a client connection is the connection
> 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.
Yep, but IMO the different images will be requested by different ovelapped get requests (not range requests) over a single connection or at most two connection as per HTTP1.1 (see below) .
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.
This limit is advised by HTTP1.1 (a configurable default for a client obeying the terms of the protocol) to be a max. of 2 connections to the same server address. We have our backbone routers configured to impose this maximum, in order to prevent some people to monopolize the network resources.
Willy.
.
- Follow-Ups:
- Re: downloading a single file using multiple threads
- From: Jon Skeet [C# MVP]
- Re: downloading a single file using multiple threads
- References:
- downloading a single file using multiple threads
- From: keerthyragavendran
- Re: downloading a single file using multiple threads
- From: Willy Denoyette [MVP]
- Re: downloading a single file using multiple threads
- From: Jon Skeet [C# MVP]
- Re: downloading a single file using multiple threads
- From: Willy Denoyette [MVP]
- Re: downloading a single file using multiple threads
- From: Peter Duniho
- Re: downloading a single file using multiple threads
- From: Willy Denoyette [MVP]
- Re: downloading a single file using multiple threads
- From: Peter Duniho
- Re: downloading a single file using multiple threads
- From: Willy Denoyette [MVP]
- Re: downloading a single file using multiple threads
- From: Jon Skeet [C# MVP]
- downloading a single file using multiple threads
- Prev by Date: Cannot apply indexing with []
- Next by Date: Re: Static Class Factory?
- Previous by thread: Re: downloading a single file using multiple threads
- Next by thread: Re: downloading a single file using multiple threads
- Index(es):
Relevant Pages
|