Re: How to disable request pipelining on nginx upstream

2021-08-05 Thread nginx_newbie1
Our upstream actually supports HTTP/2 connections. 
So, another question would be, if I use HTTP when fetching data from
upstream. I will be able to have more than 50 requests concurrently on
upstream?

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

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


Re: How to disable request pipelining on nginx upstream

2021-08-05 Thread nginx_newbie1
> No, it's not possible.
> 
> As already were said twice, nginx dosn't support pipelining on the
> upstream 
> side.
> 
>   wbr, Valentin V. Bartenev


Has there been any progress on this in the last few years?

I am trying to use Nginx as a proxy to our legacy server but the hosting
company has a limit of 50 connections per IP address.
Theoretically, if Nginx can fetch 50 requests concurrently and we have a
load of 500 users on the client-side, how can I manage that from a single
server?  Is there any setting that could help in this situation?

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

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


Re: How to disable request pipelining on nginx upstream

2016-09-18 Thread Valentin V. Bartenev
On Friday 16 September 2016 08:41:11 hkahlouche wrote:
> ​>> AFAIK, 2 different requests are served separately, meaning you can have
> >> some requests sent when some other is being responded to.
> >>
> >> If you talk about the same request, then it is only sent to the next
> >> upstream server when there is an 'unsuccessful attempt' at communicating
> >> with the current upstream server. What defines this is told by the
> >> *_next_upstream directives of the pertinent modules (for example
> >> proxy_next_upstream
> >>
> 

> >> ).
> >> That means that, by nature, there is no response coming back when the
> >> request is tried on the next server.
> >>
> I am talking about how two successive requests (from client side) are
> handled on a same already established keepalive socket towards upstream
> server: On that same socket and towards the same upstream server, is it
> possible that the nginx upstream module starts sending the subsequent
> request before the current one is completely done (by done I mean the
> complete Content-Length is transferred to the client side)?
> 

No, it's not possible.

As already were said twice, nginx dosn't support pipelining on the upstream 
side.

  wbr, Valentin V. Bartenev

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

Re: How to disable request pipelining on nginx upstream

2016-09-16 Thread hkahlouche
​>> AFAIK, 2 different requests are served separately, meaning you can have
>> some requests sent when some other is being responded to.
>>
>> If you talk about the same request, then it is only sent to the next
>> upstream server when there is an 'unsuccessful attempt' at communicating
>> with the current upstream server. What defines this is told by the
>> *_next_upstream directives of the pertinent modules (for example
>> proxy_next_upstream
>>

>> ).
>> That means that, by nature, there is no response coming back when the
>> request is tried on the next server.
>>
I am talking about how two successive requests (from client side) are
handled on a same already established keepalive socket towards upstream
server: On that same socket and towards the same upstream server, is it
possible that the nginx upstream module starts sending the subsequent
request before the current one is completely done (by done I mean the
complete Content-Length is transferred to the client side)?

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

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

Re: How to disable request pipelining on nginx upstream

2016-09-16 Thread B.R.
On Thu, Sep 15, 2016 at 11:12 PM, hkahlouche 
wrote:

> Can you please confirm, if no new request is sent to the upstream before
> the
> entire response is received for the ongoing request (ongoing request
> finished)?
> In other words, is possible that upstream module sends the next request to
> upstream server while there is still response bytes being received from
> upstream on a current request?
>

​AFAIK, 2 different requests are served separately, meaning you can have
some requests sent when some other is being responded to.

If you talk about the same request, then it is only sent to the next
upstream server when there is an 'unsuccessful attempt' at communicating
with the current upstream server. What defines this is told by the
*_next_upstream directives of the pertinent modules (for example
proxy_next_upstream

).
That means that, by nature, there is no response coming back when the
request is tried on the next server.
---
*B. R.*
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: How to disable request pipelining on nginx upstream

2016-08-29 Thread hkahlouche
Hello,

> I'm talking about upstream server, not the "server" directive in 
> the "upstream" block. Assuming you are using nginx as an upstream 
> server you should use keepalive_requests.

We are not using nginx on the upstream side (we have some legacy server),
this is why I was looking for keepalive_requests on the upstream side, or
something to better control the upstream keepalive connections (for instance
when they start failing or just close after a certain threshold of requests
reached).

Something like:

upstream backend {
 server 127.0.0.1:8080;
 keepalive 10;
 keepalive_requests 10;  ##max requests per connection 
}



It could be a good thing to add in nginx upstream module. It would allow
controlling when to close a keepalive upstream connection and setup a new
one.

Thanks!
--
Hakim

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

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


Re: How to disable request pipelining on nginx upstream

2016-08-29 Thread Maxim Dounin
Hello!

On Mon, Aug 29, 2016 at 12:23:34PM -0400, hkahlouche wrote:

> > Yes, nginx will process requests one-by-one and won't pipeline 
> > requests to upstream.
> 
> So, you confirm that the current implementation of nginx doesn't pipeline
> towards upstream, and there is no way to enable that functionality?

Yes.

> > No, it's not something currently implemented. It's not considered 
> > needed as upstream servers can be easily configured to do this 
> > instead.
> 
> Which configuration parameter of upstream server can be used for that?
> According to the documentation, we have max_fails. Is that what you were
> referring to? max_conns is for connections (not for the requests) and it is
> present only on nginx plus.

I'm talking about upstream server, not the "server" directive in 
the "upstream" block.  Assuming you are using nginx as an upstream 
server you should use keepalive_requests.

-- 
Maxim Dounin
http://nginx.org/

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


Re: How to disable request pipelining on nginx upstream

2016-08-29 Thread Phani Sreenivasa Prasad
Hi 

I have a question the other way. 

how to enable pipelining on upstream side? or atleast how to make nginx open
multiple loopack connections to serve requests pipelined from client side?

Thanks
Prasad.

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

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


Re: How to disable request pipelining on nginx upstream

2016-08-29 Thread Maxim Dounin
Hello!

On Mon, Aug 29, 2016 at 10:04:08AM -0400, hkahlouche wrote:

> Thanks for your prompt response.
> Let's a client is sending pipelined requests on the client side and nginx
> has multiple upstream keepalive connections.
> Are you saying that NGINX will NOT pipeline on upstream side even though it
> is receiving pipelined requests on client side?

Yes, nginx will process requests one-by-one and won't pipeline 
requests to upstream.

> Is there a way to close an upstream keepalive after a threshold of requests
> is reached (*max requests") same as keepalive_requests on client side? Is
> there a reason why this feature is not present? 

No, it's not something currently implemented.  It's not considered 
needed as upstream servers can be easily configured to do this 
instead.

-- 
Maxim Dounin
http://nginx.org/

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


Re: How to disable request pipelining on nginx upstream

2016-08-29 Thread hkahlouche
Thanks for your prompt response.
Let's a client is sending pipelined requests on the client side and nginx
has multiple upstream keepalive connections.
Are you saying that NGINX will NOT pipeline on upstream side even though it
is receiving pipelined requests on client side?

Is there a way to close an upstream keepalive after a threshold of requests
is reached (*max requests") same as keepalive_requests on client side? Is
there a reason why this feature is not present? 

Thanks again!
--
Hakim

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

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


Re: How to disable request pipelining on nginx upstream

2016-08-28 Thread Maxim Dounin
Hello!

On Sun, Aug 28, 2016 at 08:22:08AM -0400, hkahlouche wrote:

> Does anyone know a way to disable HTTP request pipelining on a same upstream
> backend connection? 

Pipelining is not used by nginx, there is no need to disable 
anything.

-- 
Maxim Dounin
http://nginx.org/

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