lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 483 forks source link

Concurrent download issues / potential timeouts #2189

Open tzarebczan opened 5 years ago

tzarebczan commented 5 years ago
## The Issue I was able to reproduce the issues @jackrobison was seeing with concurrent downloads. To me it seems that the same peer won't be available for the 2nd of the 2 concurrent downloads, and the 2nd download won't start until the first completes. I ran a script where 2 downloads would start concurrently and then compared it to a single download - the results were consistent. The 2nd download would never use the same peers the first did (i.e. not connect to my PC / reflector). If I ran that same download on it's own, it would. On slower connections, this would most likely cause timeouts on the 2nd download. The first and third runs are with 2 downloads, the 2nd/4th are with 1. This was done with lbry://bitcoin and lbry://one ```C:\Users\thoma\Documents\timing-scripts>node script.js Starting requests get: 3141.890ms get 2: 25644.097ms C:\Users\thoma\Documents\timing-scripts>node script.js Starting requests get: 3176.332ms C:\Users\thoma\Documents\timing-scripts>node script.js Starting requests get: 3655.100ms get 2: 25320.714ms C:\Users\thoma\Documents\timing-scripts>node script.js Starting requests resolve: 163.547ms get: 3227.946ms ```
lyoshenka commented 5 years ago

@tzarebczan can you post the script you used to do this test