haproxy配置tcp负载均衡

时间:2017-11-10 14:27:01   收藏:0   阅读:249

#---------------------------------------------------------------------
# 监控页面
#---------------------------------------------------------------------
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

 

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!