<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 18px; font-family: STFangsong, sans-serif;"><div>Hello!</div><div><br></div><div> 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 ?</div><div><br></div><div> 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 ?</div><div><br></div><div> *More important is how to find the "spirit" behind this weird problem and fix it.* </div><div><br></div><div> Thanks a lot ! !</div><div><br></div><div> Nginx Version: nginx/1.6.2</div><div> OS: CentOS release 6.5 (Final) x86_64</div><div><br></div><div> Here is access log below:</div><div><br></div><blockquote style="margin:0 0 0 40px; border:none; padding:0px;"><div>client_ip 26/Aug/2016:15:45:06 +0800 GET host_ip 80 <i>10.10.10.10:8080, backendservice </i> /backend/api/v1.0/bowner/1123223 HTTP/1.1 502 551 - UA:Java/1.8.0_60 - 0.139 0.139, 0.000</div><div><br></div><div>client_ip 26/Aug/2016:15:45:12 +0800 GET host_ip 80 <i>10.10.10.10:8080, backendservice</i> /backend/api/v1.0/bowner/1123822 HTTP/1.1 502 551 - UA:Java/1.8.0_60 - 0.070 0.070, 0.000</div><div><br></div><div>client_ip 26/Aug/2016:15:45:17 +0800 POST host_ip 80 <i>10.10.10.10:8080, 10.10.10.11:8080</i> /backend/api/v1.0/bowner/1133782</div><div> HTTP/1.1 200 129 - UA:Java/1.8.0_60 - 0.124 0.043, 0.081</div><div><br></div><div><br></div><div><div>* 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.</div></div><div><br></div></blockquote><div>Here is upstream configuration:</div><div> </div><div><blockquote style="margin:0 0 0 40px; border:none; padding:0px;"><div>upstream <i>backendservice</i> {</div><div> server <i>10.10.10.10:8080</i>weight=15;</div><div> server <i>10.10.10.11:8080</i> weight=13;</div><div>}</div><div><br></div><div><br></div></blockquote></div><div><br></div><div><br></div><div><div id="MAC_OUTLOOK_SIGNATURE"></div></div></body></html>