Nginx proxying do not locally save/buffer uploaded files?

Hello,

I’m running nginx as a proxy in front of some backend servers,
and while uploading files (HTTP PUT) nginx seems to buffer the files
to local disk.

This is not a possible method for this setup,
because some of the files are so big that they
won’t fit to the local disk of the nginx box.

Is there an option to disable this behaviour?
I’d like to directly stream the uploads to the backend…

Thanks,

– Pasi

Pasi Kärkkäinen Wrote:

Is there an option to disable this behaviour?
I’d like to directly stream the uploads to the
backend…

No. Nginx has no way of streaming data directly to the backend. Take a
look at haproxy or any other tcp load balancer.

Posted at Nginx Forum:

Pasi Kärkkäinen Wrote:

in tcp mode you can’t filter the requests etc… I
need to do that aswell.

There are quite a few load balancers and proxies out there. I’m sure you
can find something useful.

Maybe I need to take a look at the code and try to
figure out
if direct upload streaming could be implemented in
nginx…

It is possible. So, good luck I guess.

Posted at Nginx Forum:

On Wed, May 04, 2011 at 05:56:43PM -0400, jjjx128 wrote:

Pasi K. Wrote:

in tcp mode you can’t filter the requests etc… I
need to do that aswell.

There are quite a few load balancers and proxies out there. I’m sure you
can find something useful.

I’ve checked and/or used most of them :slight_smile:

Maybe I need to take a look at the code and try to
figure out
if direct upload streaming could be implemented in
nginx…

It is possible. So, good luck I guess.

Thanks. Are you familiar with nginx code?
If yes, feel free to give advises what to avoid,
and what to look for.

(I haven’t checked nginx code earlier, but I know C)

– Pasi

If we set proxy_store and proxy_cache to off, will nginx cache uploaded
files?

Posted at Nginx Forum:

On Wed, May 04, 2011 at 05:35:54PM -0400, jjjx128 wrote:

Pasi K. Wrote:

Is there an option to disable this behaviour?
I’d like to directly stream the uploads to the
backend…

No. Nginx has no way of streaming data directly to the backend. Take a
look at haproxy or any other tcp load balancer.

in tcp mode you can’t filter the requests etc… I need to do that
aswell.

Maybe I need to take a look at the code and try to figure out
if direct upload streaming could be implemented in nginx…

Thanks,

– Pasi

On Sun, May 08, 2011 at 11:12:29PM -0400, bigplum wrote:

If we set proxy_store and proxy_cache to off, will nginx cache uploaded
files?

proxy_cache only mentions “backend” … so I think it’s not for uploads…

– Pasi