# HTTP-POST Upload Buffer - Nginx Loadbalancer

**URL:** <https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603>\
**Category:** NGINX\
**Created:** [June 3, 2010, 7:53pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603 "2010-06-03T19:53:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 7:53pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/1 "2010-06-03T19:53:17Z")

</div>

Hello Nginx-List,

i need some help setting up my Nginx Loadbalancer. I use Nginx as  
Loadbalancer in front of 2 Webservers (running Nginx/PHP-FPM).

While uploading files with HTTP POST upload, these files are buffed  
(temporary storaged) on my loadbalancer, is there a way pushing those  
files (filesize 500k - 5m) directly to the Backend-Servers to minimize  
the load on the Loadbalancer?

Any hints are welcome.

Thanks for your help.

Kind regards

## Elena

GRATIS fÃ¼r alle GMX-Mitglieder: Die maxdome Movie-FLAT!  
Jetzt freischalten unter [Aktuelle Nachrichten aus Politik, Wirtschaft & Panorama | GMX](http://portal.gmx.net/de/go/maxdome01)

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 7:59pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/2 "2010-06-03T19:59:44Z")

</div>

2010/6/3 Elena Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Thanks for your help.  
> Why are you using nginx in front of nginx? Use nginx in front of two  
> backends with PHP-FPM. Or use haproxy, not nginx.

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 8:10pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/3 "2010-06-03T20:10:51Z")

</div>

2010/6/4 Malte G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> In either way you can try setting:
> 
> Â proxy\_buffering off;  
> This toggles response buffering, not request.

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 8:03pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/4 "2010-06-03T20:03:50Z")

</div>

In either way you can try setting:

proxy\_buffering off;

in your location where you placed the proxy configuration.

kind regards,  
Malte

Am 03.06.10 19:58, schrieb Mikhail Mazursky:

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 8:26pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/5 "2010-06-03T20:26:39Z")

</div>

Hello!

On Thu, Jun 03, 2010 at 07:51:59PM +0200, Elena Z. wrote:

> i need some help setting up my Nginx Loadbalancer. I use Nginx  
> as Loadbalancer in front of 2 Webservers (running  
> Nginx/PHP-FPM).
> 
> While uploading files with HTTP POST upload, these files are  
> buffed (temporary storaged) on my loadbalancer, is there a way  
> pushing those files (filesize 500k - 5m) directly to the  
> Backend-Servers to minimize the load on the Loadbalancer?

No.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 3, 2010, 8:51pm UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/6 "2010-06-03T20:51:49Z")

</div>

Thanks for your fast help.

Mikhail that is a good question, why nginx behind nginx? We Set  
up these nginx with the “sorry-server” function, so our Site  
goes never down when something goes wrong on our Application Servers,  
a minimal version is running on our “sorry-server” than its easy to bind  
in an other working Appliction server.

What about HAProxy, buffer HAProxy the HTTP UPLOAD File? Perhaps  
its a good point to rethink the use of our servers…

Thanks for your answers.

Have a nice Day.

Elena

-------- Original-Nachricht --------

> Datum: Thu, 3 Jun 2010 22:25:50 +0400  
> Von: Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> An: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> Betreff: Re: HTTP-POST Upload Buffer - Nginx Loadbalancer

> > pushing those files (filesize 500k - 5m) directly to the  
> > Backend-Servers to minimize the load on the Loadbalancer?
> 
> No.
> 
> Maxim D.
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
GRATIS fÃ¼r alle GMX-Mitglieder: Die maxdome Movie-FLAT!  
Jetzt freischalten unter [http://portal.gmx.net/de/go/maxdome01](http://portal.gmx.net/de/go/maxdome01)

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 7, 2010, 12:27am UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/7 "2010-06-07T00:27:33Z")

</div>

On Thu, Jun 3, 2010 at 2:51 PM, Elena Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks for your fast help.
> 
> Mikhail that is a good question, why nginx behind nginx? We Set  
> up these nginx with the “sorry-server” function, so our Site  
> goes never down when something goes wrong on our Application Servers,  
> a minimal version is running on our “sorry-server” than its easy to bind in an other working Appliction server.
> 
> What about HAProxy, buffer HAProxy the HTTP UPLOAD File? Perhaps  
> its a good point to rethink the use of our servers…

HAProxy does not buffer HTTP Posts. Unfortunately, it can’t terminate  
SSL so if you’re trying to upload via an HTTPS connection you’ll need  
to find a different solution altogether. FWIW, this appears to be a  
frequent feature request for Nginx. I even offered to sponsor the  
development, but never got a response. I’m not sure what the hangup  
was.

-SH

---

<div class="post-metadata">

**Author:** ![Elena\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@Elena\_Z](https://www.ruby-forum.com/u/Elena_Z)\
**Post date:** [June 4, 2010, 7:52am UTC](https://www.ruby-forum.com/t/http-post-upload-buffer-nginx-loadbalancer/189603/8 "2010-06-04T07:52:02Z")

</div>

2010/6/4 Elena Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> What about HAProxy, buffer HAProxy the HTTP UPLOAD File?  
> All info about it can be found on it’s official site  
> [http://haproxy.1wt.eu/](http://haproxy.1wt.eu/)
