[bittorrent] New P2P protocols
justin at street-vision.com
Fri Mar 25 09:16:29 EST 2005
On Fri, 2005-03-25 at 06:07 -0800, Bill Cox wrote:
> Hi, Jeff.
> On Fri, 2005-03-25 at 13:03 +0000, Jeff Burdges wrote:
> Out of curiosity, what is the source of the interest
> in UDP? I see two
> > possible reasons for UDP:
> > Or are people interested in something else?
> > Jeff
> Actually, I'm interested in having servers that can
> handle thousands of connections, which in theory could
> happen if ISPs start caching torrents. TCP has a bit
> more overhead per connection, and some socket
> implementations don't like to support > 65K sockets.
> UDP could do it with just one open socket. Also, we
> have built-in error correction in BT, so it may be
> more efficient to drop the overhead of TPC's checking.
As I said in my previous post, we dont really have error correction at
anything like a useful level for UDP unless you can error check each
packet, ie you can check 1k pieces. Otherwise you dont know which packet
had the error and have to rerequest every single one (of the order of
256+). Timeout management is also hard with UDP.
wrt over 64k sockets, I think you will have to keep at least as much
information in userspace as a tcp socket does to do anything useful, and
your coding there needs to be done well. I wouldnt recommend starting to
build something like that on an OS with a lousy IP stack anyway.
> I think these are the concerns that led to UDP based
> tracker implementations, but I'm not sure.
I think not - the tracker is a rather different case. There are no
persistent TCP connections maintained and the results generally fit in
one packet. Its also not crucial if a request fails, if retry timeouts
are managed well.
More information about the BitTorrent