2015/10/25 12:01:03 [warn] 21580#0: *12412231 an upstream response is buffered to a temporary file /home/work/nginx/proxy_temp/2/55/0000075552 while reading upstream, client: 10.159.95.***, server: ***.***.***, request: "POST *** HTTP/1.0", upstream: "http://***", host: "***.***.***"
怀疑nginx未获取到真实的用户ip,而获取到上游SLB集群的IP。
nginx官方网站中关于ip_hash的说明 Specifies that a group should use a load balancing method where requests are distributed between servers based on client IP addresses. The first three octets of the client IPv4 address, or the entire IPv6 address, are used as a hashing key. The method ensures that requests from the same client will always be passed to the same server except when this server is unavailable. In the latter case client requests will be passed to another server. Most probably, it will always be the same server as well. 飘红字段的意思是,对于IPv4,ip_hash会使用IP的前3部分作为哈希的Key,一个SLB集群对应的网段都是一致的,导致ip_hash之后的请求全部落到一台upstream机器。