nginx websocket 负载均衡配置
(2016-02-29 18:55:11)
标签:
linuxnginxwebsocketswoole |
分类: linux那些事 |
#nginx websocket 负载均衡配置
#回传消息 需要 uid+serverip+fd 绑定关系 来实现
#压测 可以用jmeter 或者 swoole作者写的
#add 2016 0226
upstream websocket{
server serverip01;
server serverip02
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 8020;
location / {
proxy_pass
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
#end 2016 0226
前一篇:nginx多核使用配置
后一篇:linux-监听进程