Reference Guide
メモ: シームレスなフェールオーバーを実行させるには、クライアント容量の合計を上回るバックエンドサーバを管理者が追加する必要が
あります。
5 CTRL+O を押して、haproxy.cfg ファイルに変更を保存します。
次のテキストは、サンプルの HAProxy 設定ファイルです。
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
daemon
#maxconn is maximum allowed connections
maxconn 60000
defaults
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
frontend fe_teradici_5172
bind
:5172
mode tcp
backlog 4096
maxconn 70000
default_backend be_teradici_5172
backend be_teradici_5172
mode tcp
option log-health-checks
option tcplog
balance leastconn
server emsdk1
:5172 check server emsdk2 5172 check : timeout queue 5s timeout server 86400s
option srvtcpka
#frontend fe_teradici_5172
#replace IP with IP of your Linux proxy machine bind Eg
: 10.150.105.119:5172
#default_backend servers
#backend servers
#Add your multiple back end windows machine ip with 5172 as port
# maxconn represents number of connection- replace 10 with limit #(below 20000)
# "server1" "server2" are just names and not keywords
#server server1 10.150.105.121
:5172 maxconn 20000 check
#server server2 10.150.105.124
:5172 maxconn 20000 check
6 次のコマンドを実行して、HAProxy 設定を検証します。
sudo haproxy –f /etc/haproxy/haproxy.cfg –c
設定が有効である場合は、設定は有効です というメッセージが表示されます。
7 次のコマンドを実行して、HAProxy サービスを再起動します。
Sudo service haproxy restart
8 次のコマンドを実行して、HAProxy を停止します。
serviceSudo service haproxy stop
34
Teradici デバイスでの高可用性の実現