首页 > 其他 > 详细

haproxy配置tcp负载均衡

时间:2017-11-10 14:27:01      阅读:249      评论:0      收藏:0      [点我收藏+]

#---------------------------------------------------------------------
# 监控页面
#---------------------------------------------------------------------
listen admin_stats
bind 0.0.0.0:1080
mode http
option httplog
stats refresh 30s
stats uri /stats
stats realm Haproxy Manager
stats auth admin:admin


#---------------------------------------------------------------------
# 后台服务 test frontend which proxys to the backends
#---------------------------------------------------------------------
listen keyservice
bind 0.0.0.0:9996
mode tcp
balance roundrobin
server s1 127.0.0.1:9995 weight 1 maxconn 100000 check inter 10s

 

启动失败,绑定端口失败处理方法
setsebool -P haproxy_connect_any=1

 

haproxy配置tcp负载均衡

原文:http://www.cnblogs.com/jiftle/p/7814374.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!