オプションコンポーネント¶
仮想IPアドレス¶
Pgpool-IIとFailoverManagerはどちらも、シームレスなフェイルオーバーに仮想IPを使用する機能を提供します。どちらもこの機能を提供しますが、フェイルオーバーマネージャーは仮想IPをマスターデータベースノードに関連付け、Pgpoolは仮想IPを現在アクティブなPgpoolホストに関連付けます(マルチPgpoolウォッチドッグ設定で)。
Pgpoolのアクティブなインスタンス(サンプルアーキテクチャではサーバー4)がダウンした場合、使用可能なスタンバイPgpoolインスタンス(watchdogの優先順位に応じて)がアクティブなPgpoolインスタンスとして機能することに注意してください。
Pgpoolウォッチドッグ¶
Watchdogは、Pgpoolノードに高可用性を提供します。このセクションでは、各Pgpoolノードでウォッチドッグを構成するために必要な構成パラメーターをリストします。
すべてのPgpoolノードに共通のウォッチドッグ構成パラメーター
use_watchdog = on # enable watchdog
wd_port = 9000 # watchdog port, can be changed
delegate_IP = ‘Virtual IP address’
wd_lifecheck_method = 'heartbeat'
wd_interval = 10 # we can lower this value for quick detection
wd_life_point = 3
# virtual IP control
if_cmdconfig_path = '/sbin' # ifconfig command path
if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'
# startup delegate IP command
if_down_cmd = 'ifconfig eth0:0 down' #shutdown DIP
arping_path = '/usr/sbin' # arping command path
arping_cmd = 'arping -U $_IP_$ -w 1' # arping command
各Pgpoolノードのカスタムウォッチドッグ構成パラメーター
以下の構成パラメーターは、各Pgpoolノードで設定する必要があります。間隔と再試行の値は、要件とテスト結果に応じて調整できます。
other_pgpool_hostname0 = '<server# IP/hostname>'
other_pgpool_port0 = 9999
other_wd_port0 = 9000
other_pgpool_hostname1 = '<server# IP/hostname>'
other_pgpool_port1 = 9999
other_wd_port1 = 9000
wd_priority = <any integer>
Note that wd_priority can be used to elevate the local watchdog node
priority in the elections to select master watchdog node. The node with
the higher wd_priority value will get selected as master watchdog node
when cluster will be electing its new master node at the time of cluster
startup or in the event of old master watchdog node failure.