Welcome! Log In Create A New Profile

Advanced

Re: questions about upstream buffering mode

December 12, 2010 01:24AM
Hi,

On 12/12/2010 06:45, Wu Bingzheng wrote:
> hi all,
> There are 2 modes of upstream, buffering and non-buffering. And there
> are some difference between them:
> 1. non-buffering mode doesn't support limit-rate.
> 2. a request in non-buffering mode decides the end of upstream by a)
> close of upstream; b) comparing the length of recived data and
> headers_out.content_length. While the request in buffering mode
> decides the end only by the close of upstream. As a result, in
> buffering mode, the upstream(such as a memcached cache) can't be
> keepalive, which leads the request in nginx to end after keepalive-time.
> I want to know why does these difference exist?
> Can't the non-buffering mode support limit-rate?
The problem with this is that if you're supporting limit rate, what
happens if you receive more data from the upstream than the limit rate
would allow you to send to the client? You'd have to buffer it (at
least partially, either in memory or on disk). ;-)
> can't the buffering mode decide the end of request by content-length?
I personally can't immediately see a reason why not (but I'd be
interested to know if there is one). It's probably not there just
because in most cases the connections to the upstreams won't fail, and
so it's more efficient to not check the size when each packet is received.

Cheers,

Marcus.

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

questions about upstream buffering mode

Wu Bingzheng December 11, 2010 11:50PM

Re: questions about upstream buffering mode

Eugaia December 12, 2010 01:24AM

Re:Re: questions about upstream buffering mode

Wu Bingzheng December 12, 2010 08:44AM

Re: questions about upstream buffering mode

Eugaia December 12, 2010 09:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready