Welcome! Log In Create A New Profile

Advanced

Re: Reverse proxy tuning

B.R.
June 10, 2016 01:36PM
RTFM:
- upstream http://nginx.org/en/docs/http/ngx_http_upstream_module.html
module (specifically the server
<http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server>
directive)
- *_next_upstream & *_*_timeout directives, for each backend communication
module and type of timeout

​The names are so close to your requests I suspect you have not made your
part of the deal http://www.catb.org/esr/faqs/smart-questions.html.​
---
*B. R.*

On Fri, Jun 10, 2016 at 10:08 AM, Artur <nginx@netdirect.fr> wrote:

> Hello !
>
> I have a nginx reverse proxy http/https for a node.js application with
> websockets (an extract of the nginx config follows).
>
> I would like to know if there is a way to :
>
> - force nginx to retry connection to the same upstream if there is any
> problem with the initial request to the upstream (timeout,
> reading/writing timeouts, ...)
>
> - do not blacklist an upstream if any error occurs
>
> - do not retry on another upstream
>
> - adjust timeouts on communications between nginx and upstreams
> (connexion, read, write, ...)
>
> I tested some parameters in the 'tests' block below but i'm not sure
> that there is any other paramater I can play with.
>
> http {
> upstream application {
> server 127.0.0.1:3030;
> server 127.0.0.1:3031;
> server 127.0.0.1:3032;
> }
> }
>
> server {
> location /nodejs/application/ {
> proxy_pass http://application;
> proxy_redirect off;
>
> # prevents 502 bad gateway error
> proxy_buffers 8 32k;
> proxy_buffer_size 64k;
>
> # enables WS support
> proxy_http_version 1.1;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Connection $connection_upgrade;
>
> # tests
> proxy_connect_timeout 75s;
> proxy_read_timeout 300s;
> proxy_send_timeout 300s;
> proxy_next_upstream off;
> }
> }
>
> Thank you for your feedback.
>
> --
>
> Best regards,
> Artur.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy tuning

Artur June 10, 2016 04:10AM

Re: Reverse proxy tuning

B.R. June 10, 2016 01:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 190
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