问题
nginx负载只负载到一台时 TPS能接近4W
nginx负载负载到两台时 TPS却降低到1W出头
这个为什么呢?应该怎么解决!
环境
主机
172.17.0.1 nginx centos7
172.17.0.2 tomcat centos7
172.17.0.3 tomcat centos7
nginx配置
#
user root;
worker_processes auto;
worker_rlimit_nofile 65536;
events {
use epoll;
worker_connections 65536;
accept_mutex on;
multi_accept on;
}
stream{
upstream probe {
server 172.17.0.2:8095 weight=3;
# server 172.17.0.3:8095 weight=3;
}
server {
listen 8091;
proxy_pass probe;
proxy_connect_timeout 1h;
proxy_timeout 1h;
}
}