How can I serve the binary through the rack?
1 answer
If you are uploading large files to upload, I would recommend that the web server serves up big data. This way, you are not wasting precious resources running the Rack application to allow the user to perform long loading times.
If you responded with a custom header ( X-Sendfile
for Apache, X-Accel-Redirect
for Nginx), the web server will use the content of the file specified as the body for the response. This will make your Rack application ready for the next request, while the web server takes care of the lengthy process of sending data to the user. You may need to enable this feature for your web server.
0
a source to share