Your solution actually isn't any more efficient than what you had before, so
I'd expect you'd see a similar performance issue.

The point of X-Accel-Redirect is that you do not have to open the file and
read it in Python. Your view should return a simple Response object with no
body, and just the appropriate headers (possibly content-type, as well as
status_code). nginx will see that header and add the body to the response
for you outside of Python, leaving your app free to service other requests
while nginx handles the file I/O.

If you're able to make these improvements and it works, I'd like to add this
to the Pyramid cookbook. So hopefully either you can issue a pull request to
the cookbook or just paste your changes here and I'll write it up. :-)

-- 

Michael

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to