Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long running preload calls waste bandwidth #793

Closed
lidel opened this issue Oct 14, 2019 · 1 comment
Closed

Long running preload calls waste bandwidth #793

lidel opened this issue Oct 14, 2019 · 1 comment

Comments

@lidel
Copy link
Member

lidel commented Oct 14, 2019

Found when testing embedded js-ipfs in Brave (#716)

Problem

When browsing resource with big DAGs, the cost of preload calls executed in the background becomes significant. The API returns CID of every child, and entire call can run for many minutes and not only block the preload queue (limited to 4 concurrent requests), but eat multiple megabytes over 3+ minutes:

2019-10-14--23-26-37

Test

$ curl 'https://node0.preload.ipfs.io/api/v0/refs?r=true&arg=QmRn43NNNBEibc6m7zVNcS6UusB1u3qTTfyoLmkugbeeGJ' --compressed > refs-r-QmRn43NNNBEibc6m7zVNcS6UusB1u3qTTfyoLmkugbeeGJ

Fix

TBD.

  • Need to introduce configurable limits for preload calls (time? response size?) in js-ipfs. This may be a global high watermark for all "delegated" modules (preload & delegated routing)
  • We could also investigate adding silent mode to the API, but this sounds like an overkill, and even if we do this, won't get shipped with go-ipfs any time soon, so need to solve it on the client
@lidel
Copy link
Member Author

lidel commented Jan 20, 2021

Superseded by #967

@lidel lidel closed this as completed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant