[Mongrel] POST with huge HTTP body
david at vrensk.com
Mon Oct 15 08:49:27 EDT 2007
On 10/15/07, Daniel Brahneborg <basic70 at gmail.com> wrote:
> I want to do the opposite, streaming data from the client to the server,
> letting the controller saving the data while it's being received.
> In particular, I want to upload large files to the RailsDav
> (http://www.liverail.net/railsdav) plugin, without having to store
> the entire file in memory during the operation.
> This seems to be a Mongrel problem, [...]
I don't have the solution to your problem, but I think you are looking in
the wrong place.
Unless you plan to have mongrel listening on a public port, this is not a
mongrel problem. The standard way to use mongrel, with Rails or not, is to
set up a few of them behind a reverse proxy like nginx or
apache+mod_proxy_balancer. In those cases, the proxy will not forward the
data to mongrel before it has received it all, and once it has all the data,
the latency between nginx and mongrel is negligible.
On the other hand, the reverse proxy (I'm only speaking from experience with
nginx here) saves the data to file while it is receiving it. I think you
should look for a solution that lets nginx pass the path to that file to
mongrel rather than sending the data again. I believe I have read about
such a solution on this very list a few months ago.
So, not the help you wanted, but I hope it leads you in the right
direction. Well, if you actually intend to have mongrel face the public,
then just forget what I said.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users