赞
踩
参数我的另一篇文章:https://mp.csdn.net/mp_blog/creation/editor/135152478
worker_processes 1;
events {
worker_connections 1024;
}stream {
upstream hiveserver2 {
# least_conn; # 使用最少连接路由策略
hash $remote_addr consistent;
server master1:10000;
server master2:10000;
}server {
listen 10010;
proxy_pass hiveserver2;
proxy_connect_timeout 60s; # 设置连接超时时间
proxy_timeout 1800s;
}
}
注意nginx使用的是stream而不是http
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。