You can use X-Sendfile. Your mongrel / ruby application simply sends back a X-Sendfile header pointing to the local file that you want to download to the user.
The web-server then takes over and streams the file to the server, and your mongrel process gets to continue without having to wait for the download. I use it with Lighttpd 1.5, and it works very well. From what I hear, this is also possible with Apache. This lets you have some security of download + still have speed. -Pete On Sep 13, 2007, at 8:47 AM, Joel Nylund wrote: > Hi, on my site I have several screen casts (using flash video flv) in > addition to the normal rails application which is the core service, > my setup is apache proxy/balancing to 2 mongrels. > > I was thinking I should probably not be serving up streaming video > from mongrel as it will occupy the mongrel processes for long periods > of time right? > > So I was thinking of excluding a directory from the proxy and serving > videos up from apache. > > Does anyone have an example of how to do this and or agree its a good > idea to not serve the videos from mongrel and offload this work to > apache? > > thanks > Joel > > _______________________________________________ > Mongrel-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/mongrel-users _______________________________________________ Mongrel-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/mongrel-users
