lbryio / lbryio/lbry-sdk

Dynamically set max connections per download

Open
#2,094 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: DHT area: network
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

## The Issue
As part of the connection manager epic, we need a better way to control how many peers are simultaneously downloaded from for each blob. Currently the value is 8, which penalizes slow connections on well seeded content since this effectively reduces their bandwidth by the number of peers they connect to. If we lower the number, it penalize high bandwidth users who may not be able to find new peers they otherwise would have.

We've discussed a few ways of doing this, and I think the connection manager will need to keep adjusting this value based on the user's bandwidth / past performance. The connection manager would also do a better job at tracking good peers, and when it finds one, it should just continue using it instead of trying to download simultaneously.

IMO, this is the source of many of the download errors related to data blobs, on well seeded content.

## System Configuration

- LBRY Daemon version:
- LBRY App version:
- LBRY Installation ID:
- Operating system:

## Anything Else

## Screenshots

## Internal Use

### Acceptance Criteria
1.
2.
3.

### Definition of Done
- [ ] Tested against acceptance criteria
- [ ] Tested against the assumptions of user story
- [ ] The project builds without errors
- [ ] Unit tests are written and passing
- [ ] Tests on devices/browsers listed in the issue have passed
- [ ] QA performed & issues resolved
- [ ] Refactoring completed
- [ ] Any configuration or build changes documented
- [ ] Documentation updated
- [ ] Peer Code Review performed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the connection manager and the current per-blob limit of 8, then review how peer bandwidth and past performance are tracked. Done would require a decided adjustment strategy, implementation, and tests, but the issue's acceptance criteria are blank.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.