“… 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. …”
My Apache 2.2 load balancing reverse proxy forwards all data
immediately, without storing it in an “intermediate-file”. I believe
this is standard behavior. So this should not be the problem.
I think the problem is in the fact that Mongrel stores the whole
file-object before passing it through to Rails, right? Unfortunately I
have no clue how to fix that.
Tim
----- Original Message ----
From: David V. [email protected]
Sent: Monday, October 15, 2007 2:49:27 PM
Subject: Re: [Mongrel] POST with huge HTTP body
On 10/15/07, Daniel B. [email protected] 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.
Good luck!
/David
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
panel and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7