我正在运行nginx作为loadbalancer来提供~1000平均req / s的HTTPS请求。所有请求都代理其他8个nginx。
从日志开始,nginx-loadbalancer的平均响应时间约为300ms。但是,更多地看日志,我发现很少有请求(0.5%)的nginx-loadbalancer请求时间比上游响应时间大得多。在这里,我的日志
var tr="<tr>YOUR DATA WITH TDs</tr>";
$(".factura").append(tr);
以下是10分钟捕获的平均nginx统计数据
Time remote_address request_time status upstream_response_time upstream_addr body_bytes_sent request
---------------------------------------------------------------------------------------------------------------------------------------
July 4th 2015, 12:57:40.000 36.79.115.36 48.659 200 14.185 172.16.1.34:6081 46,890 GET /sys...
July 4th 2015, 12:57:39.000 114.79.32.74 5.44 200 5.440 172.16.1.16:8080 53,525 GET /v2/...
July 4th 2015, 12:57:39.000 36.68.179.9 7.841 200 1.255 172.16.1.19:8080 158 POST /pro...
July 4th 2015, 12:57:39.000 114.125.172.41 7.19 200 3.643 172.16.1.34:6081 46,355 GET /sys...
July 4th 2015, 12:57:39.000 114.125.169.243 11.189 200 0.065 172.16.1.53:8080 11,416 GET / HT...
July 4th 2015, 12:57:39.000 202.72.215.103 5.996 200 1.010 172.16.1.17:8080 20,969 GET /nor...
July 4th 2015, 12:57:39.000 114.125.175.62 5.018 200 5.018 172.16.1.53:8080 23,276 GET /v2/...
July 4th 2015, 12:57:39.000 114.124.1.75 6.979 200 1.219 172.16.1.21:8080 157 POST /pro...
我不知道如何追踪导致response_time负载均衡器和上游差别很大的原因。有人有想法吗?
RGDS,