Welcome! Log In Create A New Profile

Advanced

Re: proxy_next_upstream off и hash consistent

Vladimir Stackov
December 25, 2015 12:46PM
Пока конфиг в почте правил, пропустил.
На самом деле после proxy_http_version 1.1; ещё и proxy_set_header
Connection "";

25 декабря 2015 г., 19:01 пользователь Vladimir Stackov <
amigo.elite@gmail.com> написал:

> Приветствую,
>
> http {
> log_format lb
> '$remote_addr\t[$time_local]\t$http_x_warehouse_code\t$upstream_addr';
>
> upstream groups {
> hash $http_x_warehouse_code consistent;
> server 127.0.0.1:8001 max_fails=0;
> server 127.0.0.2:8002 max_fails=0;
> keepalive 1000;
> }
>
> server {
> listen 80;
> access_log /var/log/nginx/lb_groups.log lb;
> access_log /var/log/nginx/access.log main;
>
> location / {
> proxy_pass http://groups;
> proxy_http_version 1.1;
> #proxy_next_upstream error timeout http_502;
> proxy_next_upstream off;
> }
> }
> }
>
> При этом
>
> # grep , lb_groups.log
> 10.98.26.35 [25/Dec/2015:17:40:01 +0300] 552277 127.0.0.2:8002,
> 127.0.0.1:8001, 127.0.0.1:8001
> 10.98.21.188 [25/Dec/2015:17:41:28 +0300] 543382 127.0.0.1:8001,
> 127.0.0.2:8002
> 10.98.65.252 [25/Dec/2015:17:47:06 +0300] 210024 127.0.0.2:8002,
> 127.0.0.1:8001
> 10.98.10.65 [25/Dec/2015:17:47:06 +0300] 703024 127.0.0.2:8002,
> 127.0.0.1:8001
> 10.98.45.143 [25/Dec/2015:17:47:25 +0300] 020122 127.0.0.1:8001,
> 127.0.0.2:8002
>
> Вопросы:
> 1. Почему переключение на следующий апстрим происходит, т.е. почему nginx
> игнорирует proxy_next_upstream и max_fails=0?
> 2. Как объяснить nginx'у, что так делать не следует?
>
> --
> Kind regards,
> Vladimir.
>



--
Kind regards,
Vladimir.
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

proxy_next_upstream off и hash consistent

Vladimir Stackov December 25, 2015 12:42PM

Re: proxy_next_upstream off и hash consistent

Vladimir Stackov December 25, 2015 12:46PM

Re: proxy_next_upstream off и hash consistent

Vladimir Stackov December 25, 2015 12:52PM

Re: proxy_next_upstream off и hash consistent

Maxim Dounin December 25, 2015 03:12PM

Re: proxy_next_upstream off и hash consistent

Vladimir Stackov December 26, 2015 11:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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