Welcome! Log In Create A New Profile

Advanced

Re: multi server addresses appear in variable $upstream_addr which was not supposed to

B.R.
August 28, 2016 01:56PM
The docs say multiple servers might be contacted: $upstream_addr
<http://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_addr>
Upstream groups are used to tolerate errors on some responses (and replay
the request somewhere else): upstream
<http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream>
---
*B. R.*

On Sun, Aug 28, 2016 at 3:47 PM, 褚夫元 <chufuyuan@live.cn> wrote:

> Hello!
>
> It is pretty strange that there was two upstream servers in
> $upstream_addr. It seems two servers received request and both had a
> respose. Client received the response which took less duration time, I
> guess. Am I right ?
>
> What is stranger is the name of upstream server group appears in
> $upstream_addr. I don't know the consequence in such situation. Any explain
> ?
>
> *More important is how to find the "spirit" behind this weird problem
> and fix it.*
>
> Thanks a lot ! !
>
> Nginx Version: nginx/1.6.2
> OS: CentOS release 6.5 (Final) x86_64
>
> Here is access log below:
>
> client_ip 26/Aug/2016:15:45:06 +0800 GET host_ip 80
> *10.10.10.10:8080 http://10.10.10.10:8080, backendservice *
> /backend/api/v1.0/bowner/1123223 HTTP/1.1 502 551 -
> UA:Java/1.8.0_60 - 0.139 0.139, 0.000
>
> client_ip 26/Aug/2016:15:45:12 +0800 GET host_ip 80
> *10.10.10.10:8080 http://10.10.10.10:8080, backendservice*
> /backend/api/v1.0/bowner/1123822 HTTP/1.1 502 551 -
> UA:Java/1.8.0_60 - 0.070 0.070, 0.000
>
> client_ip 26/Aug/2016:15:45:17 +0800 POST host_ip 80
> *10.10.10.10:8080 http://10.10.10.10:8080, 10.10.10.11:8080
> http://10.10.10.11:8080* /backend/api/v1.0/bowner/1133782
> HTTP/1.1 200 129 - UA:Java/1.8.0_60 -
> 0.124 0.043, 0.081
>
>
> * Backend API /backend/api/v1.0/bowner/{request_id} is supposed to be
> processed by one server. One server will be return 500 code if many backend
> servers received same request at (almost) same time.
>
> Here is upstream configuration:
>
>
> upstream *backendservice* {
> server *10.10.10.10:8080 http://10.10.10.10:8080*weight=15;
> server *10.10.10.11:8080 http://10.10.10.11:8080* weight=13;
> }
>
>
>
>
>
> _______________________________________________
> 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

multi server addresses appear in variable $upstream_addr which was not supposed to

褚夫元 August 28, 2016 10:12AM

Re: multi server addresses appear in variable $upstream_addr which was not supposed to

B.R. August 28, 2016 01:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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