Last active
December 20, 2018 09:03
-
-
Save lilongen/7d7fa202216554447dee0796afce0161 to your computer and use it in GitHub Desktop.
haproxy.example.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ModLoad imudp | |
$UDPServerRun 514 | |
$FileCreateMode 0644 | |
$FileOwner ha | |
local0.* /var/log/haproxy.log | |
local1.* /var/log/haproxy_warn.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
daemon | |
maxconn 2560 | |
pidfile /var/run/haproxy.pid | |
log 127.0.0.1 local0 info | |
log 127.0.0.1 local1 warning | |
listen stats | |
bind *:1080 | |
mode http | |
stats refresh 30s | |
stats uri /stats | |
stats realm HAProxy\ Stats | |
stats auth admin:admin | |
defaults | |
mode tcp | |
log global | |
timeout connect 5000ms | |
timeout client 50000ms | |
timeout server 50000ms | |
frontend tidb-proxy | |
mode tcp | |
bind *:4001 | |
option tcplog | |
log global | |
default_backend tidb | |
backend tidb | |
server srv212 172.31.0.212:4000 | |
server srv213 172.31.0.213:4000 | |
server srv215 172.31.0.215:4000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment