Install Guide

3 執行下列命令以設定 HAProxy
使用命令 sudo cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.original,在編輯前先備份原始組態
現在,使用命令 sudo nano /etc/haproxy/haproxy.cfg 編輯組態檔案
在組態檔案中,視需要編輯下列區段:
全域區段:Maxconn <最大連線數目>
前端 tcp-in:繫結 <HAProxy 伺服器 IP>:5172
後端伺服器:伺服器 <伺服器別名> <Teradici 裝置 Proxy 伺服器 IP>:5172
maxconn <每個 Teradici 裝置 Proxy 伺服器的最大連線數目>
註: 為了達到高可用性,系統管理員可新增額外的後端伺服器 (超過用戶端容量總數),以獲得順暢的容錯移轉。
編輯組態後,請使用命令 Ctrl + O 儲存組態
提供範例 HAProxy 組態如下:
全域
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
daemon
#maxconn is maximum allowed connections
maxconn 50000
預設值
log global
mode tcp
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
前端 tcp-in
# 使用您 Linux Proxy 機器的 IP 來取代 IP
繫結 10.150.99.102:5172
預設_後端伺服器
設定負載平衡
89