この付録では、2 つの Load Balancer コンポーネント (Dispatcher コンポーネントおよび CBR コンポーネント) の機能が Caching Proxy と一緒に結合されている、2 層高可用性構成のセットアップ方法について説明します。
図 43 用のサーバー・マシン・セットアップは、以下のとおりです。
図 43 には、複数のバックエンド Web サーバー間でロード・バランシングされる複数のサーバー (EdgeServer1、EdgeServer2、EdgeServer3) の基本表現が示されています。 CBR コンポーネントは Caching Proxy を使用して、URL のコンテンツを基にして要求をバックエンド Web サーバーに転送します。 Dispatcher コンポーネントは、EdgeServer 間の CBR コンポーネントのロード・バランシングを行うために使用されます。 Dispatcher コンポーネントの高可用性フィーチャーは、高可用性プライマリー・マシン (EdgeServer1) がいつ失敗しても、バックエンド・サーバーに対する要求が継続されることを保証するために使用されます。
基本構成ガイドライン:
Caching ON
CacheMemory 128000 K
ReversePass /* http://websrvA.company.com/* http://www.company.com/*
サンプル構成ファイル:
以下のサンプル構成ファイルは、図 43 に示されている Edge Component 構成のセットアップ時に作成されるファイルと類似しています。 サンプル構成ファイルは、Load Balancer の Dispatcher および CBR コンポーネント用のファイルを表しています。 サンプル構成では、単一のイーサネット・アダプターが EdgeServer マシンのそれぞれに使用され、アドレスのすべてはプライベート・サブネット内で表されます。 サンプル構成ファイルでは、指定されたマシン用に以下の IP アドレスが使用されます。
プライマリー高可用性 EdgeServer 上の Dispatcher コンポーネント用サンプル構成ファイル:
dscontrol executor start
dscontrol cluster add 192.168.1.11 primaryhost 192.168.1.10
dscontrol port add 192.168.1.11:80
dscontrol server add 192.168.1.11:80:edgeserver1 address 192.168.1.10
dscontrol server add 192.168.1.11:80:edgeserver2 address 192.168.1.20
dscontrol server add 192.168.1.11:80:edgeserver3 address 192.168.1.30
dscontrol manager start manager.log 10004
dscontrol highavailability heartbeat add 192.168.1.10 192.168.1.20
dscontrol highavailability backup add primary auto 4567
EdgeServer 上の CBR コンポーネント用サンプル構成ファイル:
cbrcontrol set loglevel 1
cbrcontrol executor start
cbrcontrol cluster add 192.168.1.11
cbrcontrol port add 192.168.1.11:80
cbrcontrol server add 192.168.1.11:80:webserverA address 192.168.1.71
cbrcontrol server add 192.168.1.11:80:webserverB address 192.168.1.72
cbrcontrol server add 192.168.1.11:80:webserverC address 192.168.1.73
cbrcontrol rule add 192.168.1.11:80:webA_rule type content
pattern (URI=*WSA*)|(URI=*wsA*) priority 21
cbrcontrol rule useserver 192.168.1.11:80:webA_rule webserverA
cbrcontrol rule add 192.168.1.11:80:webB_rule type content
pattern (URI=/WS_B*) priority 22
cbrcontrol rule useserver 192.168.1.11:80:webB_rule webserverB
cbrcontrol rule add 192.168.1.11:80:webC_rule type content
pattern URI=*webC* priority 23
cbrcontrol rule useserver 192.168.1.21:80:webC_rule webserverC