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

Consider checking TX load when serving thumbnails too #15

Open
daniil-berg opened this issue Sep 13, 2024 · 0 comments
Open

Consider checking TX load when serving thumbnails too #15

daniil-berg opened this issue Sep 13, 2024 · 0 comments
Assignees
Labels
consistency An inconsistency that should be (re-)aligned error handling More helpful and transparent error handling/logging

Comments

@daniil-berg
Copy link
Contributor

We are currently checking the TX load of the storage node, whenever it has to serve a video file itself (i.e. does not redirect to a distributor). If it exceeds the max_load_file_serving threshold, we respond with a 503.

if request.http_range.start is not None and request.http_range.start > 0:
# Never redirect requests for later parts of the video
ensure_acceptable_load(tx_load, log=log)
return # Serve file
node, has_complete_file = dist_controller.get_node_to_serve(file)
if node is None:
# Found no distributor node that has the file or is downloading it
ensure_acceptable_load(tx_load, log=log)
return # Serve file

We do not do the same thing for thumbnails, which are always served by the storage node. I think for consistency, we probably should. @MartinGauk, what do you think?

@daniil-berg daniil-berg self-assigned this Sep 13, 2024
@daniil-berg daniil-berg added consistency An inconsistency that should be (re-)aligned error handling More helpful and transparent error handling/logging labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency An inconsistency that should be (re-)aligned error handling More helpful and transparent error handling/logging
Projects
None yet
Development

No branches or pull requests

1 participant