multi server addresses appear in variable $upstream_addr which was not supposed to
褚夫元
chufuyuan at live.cn
Sun Aug 28 13:47:40 UTC 2016
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, 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, 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, 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:8080weight=15;
server 10.10.10.11:8080 weight=13;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160828/767dad6e/attachment.html>
More information about the nginx
mailing list