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

Serving files from Slivka #41

Open
warownia1 opened this issue Jul 3, 2018 · 3 comments
Open

Serving files from Slivka #41

warownia1 opened this issue Jul 3, 2018 · 3 comments
Labels

Comments

@warownia1
Copy link
Collaborator

We need to find a way to serve created data files from the server that will not cause the entire system to block. Serving files by Slivka app make one thread unavailable for further request processing while the file is being downloaded.

@warownia1
Copy link
Collaborator Author

Two distinct endpoints can be created for uploading/listing files e.g. /files or /tasks/{id}/files and for downloading file contents e.g. /media.
Content will be served by web server (Apache) while other operation are done by application server (uwsgi/gunicorn).
Caveat! Output files must be copied/linked to the media directory to be accessible.

@warownia1
Copy link
Collaborator Author

Setting Flask.config['USE_X_SENDFILE'] = True makes flask.send_file add X-Sendfile header to be handled by proxy server instead of serving the file directly.

@warownia1 warownia1 reopened this Nov 20, 2019
@warownia1
Copy link
Collaborator Author

Required mod_xsendfile for Apache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant