Nginx 提升吞吐量利器 Keeplived

proxy_http_version 默认是1.0没有长连接 采用1.1

proxy_set_header 清除请求头中连接信息

	upstream	colony {
		server	xxx.xx.xxx.xx	weight=1;
		#keepalive	32;	
	}

	server {
		listen	8088;
		server_name	blogspring.cn;

		location / {
			proxy_pass	http://colony;
			#proxy_http_version	1.1;
			#proxy_set_header	Connection "";
		}
	}

没设置Keepalived 的吞吐量

没设置 Keeplived 但是设置了 长连接和请求请求头 ,看得出差别并不大

	upstream	colony {
		server	xxx.xx.xxx.xx	weight=1;
		keepalive	32;	
	}

	server {
		listen	8088;
		server_name	blogspring.cn;

		location / {
			proxy_pass	http://colony;
			proxy_http_version	1.1;
			proxy_set_header	Connection "";
		}
	}

设置了keepalived 吞吐量 有了明显的提升

原文地址:https://www.cnblogs.com/blogspring/p/14191756.html