Welcome! Log In Create A New Profile

Advanced

Re: Buffering issues with nginx

Francis Daly
July 19, 2017 04:18PM
On Mon, Jul 17, 2017 at 09:47:39PM -0400, Dan34 wrote:

Hi there,

> > Are you concerned about the request or the response being buffered?
>
> my problem is that response that my node app (upstream server) generates is
> buffered by nginx.

So you want proxy_buffering (http://nginx.org/r/proxy_buffering) set to
"off" in the location that does the proxy_pass.

> My actual goal is to know speed and amount of data that my node app sent to
> a client.

It may be the case that that is not knowable, in general, in a single
http request.

Depending on the compromises you are willing to make, to accuracy or
convenience, you may be able to come up with something good enough.

> So, when I sent 20MB binary blob from node I can wait till data is
> sent out and I'll know approximate speed and size. The moment I put my node
> app behind an nginx proxy things fall apart: suddenly all transfers are
> instant, and I cannot even know if entire 20MB of data was delivered or if
> the connection failed in the middle.

Yes. That is (part of) what a proxy does. Even without nginx as a
reverse-proxy, your client might be talking through one or more proxy
servers. You will never know whether your response got to the actual
end client, without some extra verification step that only the end
client does.

> When I updated some of these buffering
> configs things improved, but still were failing with smaller uploads that
> are still fully buffered by nginx.

proxy_buffers and proxy_buffer_size can be tuned (lowered, in this case,
probably) to slow down nginx's receive-rate from your upstream.

If you can show one working configuration with a description of how
it does not do what you want it to do, possibly someone can offer some
advice on what to change.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Buffering issues with nginx

Dan34 July 17, 2017 02:06AM

Re: Buffering issues with nginx

Francis Daly July 17, 2017 05:16AM

Re: Buffering issues with nginx

Dan34 July 17, 2017 09:47PM

Re: Buffering issues with nginx

Francis Daly July 19, 2017 04:18PM

Re: Buffering issues with nginx

Dan34 July 21, 2017 07:02AM

Re: Buffering issues with nginx

Valentin V. Bartenev July 21, 2017 09:20AM

Re: Buffering issues with nginx

Dan34 July 21, 2017 01:45PM

Re: Buffering issues with nginx

Valentin V. Bartenev July 21, 2017 05:06PM

Re: Buffering issues with nginx

Dan34 July 22, 2017 02:00AM

Re: Buffering issues with nginx

Dan34 July 24, 2017 10:28AM

Re: Buffering issues with nginx

Dan34 July 24, 2017 12:24PM

Re: Buffering issues with nginx

Francis Daly July 24, 2017 03:06PM

Re: Buffering issues with nginx

Dan34 July 29, 2017 10:16PM

Re: Buffering issues with nginx

Dan34 July 29, 2017 10:41PM

Re: Buffering issues with nginx

Valentin V. Bartenev July 30, 2017 10:16AM

Re: Buffering issues with nginx

Dan34 July 30, 2017 02:03PM

Re: Buffering issues with nginx

Dan34 July 31, 2017 02:37AM

Re: Buffering issues with nginx

Igal @ Lucee.org July 19, 2017 04:22PM

Re: Buffering issues with nginx

Dan34 July 21, 2017 05:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready