arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation

Home Page:http://libtorrent.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add multiplexing support for tracker announces over HTTP/1.1

Outbid9727 opened this issue · comments

I'd like to propose a feature enhancement: adding support for multiplexing tracker announces over HTTP(s). Currently, our tracker operates with HTTP/1.1 keep-alive support, using OpenSSL TLS for secure connections. However, when libtorrent-based clients make announces, they don't make the most of the HTTP/1.1 keep-alive feature. Instead, they establish a new connection and initiate a new SSL handshake for each announce. This approach is resource-intensive, especially given our use of TLS on the tracker, resulting in additional round-trips.

Now that the library employs a queue-based announce system, I believe it could benefit from multiplexing, particularly during client startup and shutdown. This implementation could lead to significant improvements in both client startup and shutdown performance. In a broader sense, we could maintain open connections after announces, allowing the server to manage timeouts or implementing a custom mechanism for this purpose.