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

Prefetch the whole data after the request with range completed #1050

Open
jim3ma opened this issue Jan 26, 2022 · 2 comments
Open

Prefetch the whole data after the request with range completed #1050

jim3ma opened this issue Jan 26, 2022 · 2 comments
Assignees

Comments

@jim3ma
Copy link
Member

jim3ma commented Jan 26, 2022

Feature request:

When download a file with range, after a while, the following requests with other range may be sent to proxy.
So, prefetch the whole data will be very useful to save more time cost.

Currently, the requests with diff range are different task, we need merge them into a same task.

Use case:

Desire:
request 1: http://example.com/file/a.tar.gz, range: 1024-4096, task id: task-1
request 2: http://example.com/file/a.tar.gz, range: 4096-8192, task id: task-1
request 3: http://example.com/file/a.tar.gz, range: 0-, task id: task-1

  1. All request with same url, different range, use same task.
  2. The daemon should download the special range first after start a peer task.
@fannaihao
Copy link

Expect this feature.
It will improve the efficiency of remote random read produced by lazy-pull snapshotter (like Nydus) a lot.

@jim3ma
Copy link
Member Author

jim3ma commented Feb 25, 2022

#1078 implements this feature.
TODO: prefetch the whole url after ranged request done.

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

3 participants