It looks like for localhost buffers are bigger, but even if it's not local
host I do get 5MB stuck in socket buffers. I was only able to get perfect
results by writing my own proxy in c and doing some obscure nodejs code to
avoid buffering.

In any case, if nginx does not provide a way to control sockets buffer I
cannot use it. For example, 'X-Accel-Buffering: no' supposedly disables
caching (I didn't see any effect of that anyways), so I wanted to add some
kind of headers to be able to tell nginx what buffers to set per connection.
In my case I do regular reverse proxy stuff with nginx, but on certain
connections I need exact control and nginx doesn't provide any of that.
haproxy for example worked much better for me, but it's sndbuf/rcvbuf
settings are global, which is equally unacceptable.

Would that be easy to add headers like these X-Accel-Up-Rcvbuf: 12345,
X-Accel-Down-Sndbuf: 4567 so that on getting them from upstream nginx would
configure sockets that are used by that connection?

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,275526,275729#msg-275729

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to