搜尋此網誌

2017年1月31日 星期二

使用 haproxy 來分流2


依照訪問的PORT號  分配訪問候端伺服器


frontend  http
bind 47.90.90.112:5222
bind 47.90.90.112:5333


設定規則
    acl d1 dst_port 5222
    use_backend JabberD1 if d1

依照規則分流
backend JabberD1
    tcp-check connect
    tcp-check send PING\r\n
    tcp-check expect string +PONG
    server Server1ZoneD 10.60.30.209:80  check

backend JabberE1
    tcp-check connect
    tcp-check send PING\r\n
    tcp-check expect string +PONG
    server Server1ZoneE 10.60.47.4:80    check


參考 http://serverfault.com/questions/577103/how-to-configure-haproxy-to-route-by-port-without-using-multiple-frontend-or-lis/589148

沒有留言:

張貼留言

搜尋此網誌