dominikh / gamayun

Torrent client designed for seeding tens of thousands of torrents.
MIT License
14 stars 0 forks source link

Implement flexible connection limit #13

Open dominikh opened 3 years ago

dominikh commented 3 years ago

A static per-torrent peer limit is quite wasteful.

If we're happy to have 100 peers globally, and we have only one active torrent, then that torrent should be able to have 100 peers. Instead, have a global peer limit, a limit of active torrents, and dynamically adjust per-torrent limits, possibly disconnecting peers from busy torrents when new torrents become active.

The same algorithm probably works for incoming and outgoing connections.