The problem with sending large files from Rails, is that the process can block until the file has completed. This knocks out one of your processes that could be dealing with requests.
Fortunately you can use X-Sendfile, which offloads the work to apache to handle and your process will continue working. You just say what file you want to send and it returns. There's an apache module that does all the hard work.
Here's a more thorough explanation.
No comments:
Post a Comment