large uploads

Eric Wong normalperson at
Sat Oct 1 00:06:07 EDT 2011

John Joseph Bachir <j at> wrote:
> So buffering the entire request and then sending it to the backend is
> the default behavior of HttpUpstreamModule? That's fascinating. It
> almost seems like that's a bad design choice, because it inhibits the
> possibility of parallel work being done as the request comes in (like,
> it's the opposite of how unix pipes work).

Yes, exactly.  It's a design trade-off; if a client is uploading slowly
(whether intentionally or maliciously) the process-per-client model of
Unicorn is /extremely/ inefficient and will easily be shut down
by slow clients.

If you want to be able to process uploads in a Rack application while
the client is uploading, you'd have to ensure your app is thread-safe
and use Rainbows! + ThreadSpawn/ThreadPool.

More information about the mongrel-unicorn mailing list