Re: Upstream Keepalive connection close
Hi Maxim, If possible I would like to use a keep-alive connection timeout less than that of the backend servers to avoid premature connection close by backend server. As mentioned before, I am trying to avoid other options like rerouting using proxy_next_upstream or retrying by downstream client. Is there a way to set a timeout on keep-alive connections to backend servers? Or even force close or invalidate the connection cache from code? Thanks, Gona Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255966,256878#msg-256878 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Upstream Keepalive connection close
Hi Maxim, Thanks for the response. So my understanding from this is - the race condition is possible and when it happens with one server in the upstream block or proxy_next_upstream set to OFF, Nginx will return back an error without retrying. Is this right? Thanks, Gopala Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255966,256128#msg-256128 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Upstream Keepalive connection close
I have Nginx server configured with couple of backend servers with keepalive connections enabled. I am trying to understand what will be the Nginx's behaviour in case the connection is closed by an upstream server legitimately when Nginx is trying to send a new request exactly at the same time. In this race condition, does Nginx re-try the request internally or does it return an error code? In case Nginx needs to be forced to retry, should I be using proxy_next_upstream? My understanding is that this setting will make the request re-tried on the next server in the upstream block. On the same note, how do I force the retry on the failed server first to avoid cache misses. Thanks, Gopala Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255966,255966#msg-255966 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: rewrite url in upstream block
Any help on this really appreciate. The request handler is in Lua. It basically breaks a request in to sub requests, adds a query parameter to each sub request and directs them through an consistent hash upstream module in C. The upstream configuration, reads the query parameter and sets it to the command variable. I don't see a way to remove the query parameter after this step. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250892,252151#msg-252151 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
rewrite url in upstream block
Hi, I am using a query parameter in upstream module to serve request based on consistent hashing. This query parameter is introduced in the request handler module and not originally coming from the downstream. I would like to remove this parameter once the job is done before sending it to an upstream server but I couldn't see a place where to do this. Rewrite rules are not allowed in upstream block. Is there a better way of doing this? Thanks, Gona Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250892,250892#msg-250892 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx