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

global: serving using X-SENDFILE #82

Open
jirikuncar opened this issue Jul 5, 2016 · 2 comments
Open

global: serving using X-SENDFILE #82

jirikuncar opened this issue Jul 5, 2016 · 2 comments

Comments

@jirikuncar
Copy link
Member

jirikuncar commented Jul 5, 2016

@jirikuncar commented on Fri Sep 18 2015

Is there any interest on having this feature implemented here? @inveniosoftware/triagers

@tiborsimko
Copy link
Member

It would be definitely useful regarding scalability. Otherwise, serving files from the Python app directly, would basically mean blocking one WSGI worker process until the file transfer is over... This could make the whole system unresponsive in the case of user storms or when transferring really big files.

@lnielsen
Copy link
Member

Should be pretty easy to implement: https://github.com/pallets/flask/blob/master/flask/helpers.py#L516-L521

And we should just rely on Flask's default behaviour with USE_X_SENDFILE.

We are however recommending using Nginx today (via our docker recipes), and Nginx uses X-Accel-Redirect instead of X-Sendfile:
https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/#

@lnielsen lnielsen modified the milestone: someday Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants