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

Flow-control for download #58

Open
graebm opened this issue Oct 3, 2024 · 0 comments
Open

Flow-control for download #58

graebm opened this issue Oct 3, 2024 · 0 comments

Comments

@graebm
Copy link
Contributor

graebm commented Oct 3, 2024

We don't want to fill RAM with parts faster than the user can handle them. It's a waste of resources, and can lead to inefficiencies.

For example, when downloading a file to disk, EBS is the bottleneck. If we download as fast as possible we're filling RAM with parts much faster than we can deal with them, which wastes RAM. It also leads to inefficiencies if many files are downloading at once. We can write multiple files faster than writing one. If the first file is hogging all the concurrency, the other files will be starved.

There should be some mechanism for per-object flow-control. Maybe a maximum "window" of uncollected parts per object? Maybe a collect function where the user indicates the maximum number of parts or bytes they're willing to receive? Maybe something like Java's Flow.Subscription.request()?

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