questions about upstream buffering mode

Eugaia ngx.eugaia at gmail.com
Sun Dec 12 17:23:16 MSK 2010


Hi,

On 12/12/2010 15:40, Wu Bingzheng wrote:
> In non-buffering mode, even if there is no limit-rate, the downstream connetion still maybe slower than the upstream, such as because the downstream network situation is bad. Now, if the downstream is slower, and the data buffer is full, nginx will stop recieving data from upstream. So I think, adding limit-rate into non-buffering mode will not bring any problem about the data buffer you said.
> If the downstream is blocked by limit-rate and the data buffer is full, just stop receiving data, just like what it does now.
Yes, stopping receiving is obviously another option. I agree that it 
would probably work in a very similar way to slow downstreams now, and 
wouldn't have any additional problems - and I think it would be a good 
idea to add it.
>
> Just because of efficience?
I was merely speculating on Igor's motivations. I don't know. :-)
> But it causes some inconvenience, such as the upstream server can't be configed as keepalive mode (if the upstream is http proxy, it can be keepalive, because nginx dosen't support keepalive as a http client).
> there is a good addon module, HttpUpstreamKeepaliveModule, which can re-use memcached upstream connections. But it need the memcahced server to be configed as keepalive mode. Which means, if we configed the memcached upstream module as buffering mode(may because we need limit-rate...), we can't config the memcached server in keepalive mode, so we can't use HttpUpstreamKeepaliveModule.
Is it not possible to have memcached in both buffering an keepalive mode?

Perhaps your options are either to write a patch for Nginx or use 
something else (HAProxy / Trafficserver might be good alternatives).

Marcus.



More information about the nginx mailing list