9. 大雑把な構成イメージ ※色々省略してます
node01.example.jp
IP:192.168.20.21
consul server 01
node04.example.jp
IP:192.168.20.41
consul client 01
apach01
node02.example.jp
IP:192.168.20.22
consul server 02
node03.example.jp
IP:192.168.20.23
consul server 03
node05.example.jp
IP:192.168.20.42
consul client 02
apach02
consul操作script等
consul操作script等
consulクライアントで自身のノー
ドにあるApacheの状態を監視
Apacheで実行されているWeb
アプリをサービスとして
consulに登録
Webアプリがサービスとして登
録された事をイベント的に検知
して何かを行う等
12. 大雑把な構成イメージ ※色々省略してます
node01.example.jp
IP:192.168.20.21
consul server 01
node04.example.jp
IP:192.168.20.41
consul client 01
apach01
node02.example.jp
IP:192.168.20.22
consul server 02
node03.example.jp
IP:192.168.20.23
consul server 03
node05.example.jp
IP:192.168.20.42
consul client 02
apach02
consul操作script等
consul操作script等
25. またこの図ですが ※色々省略してます
node01.example.jp
IP:192.168.20.21
consul server 01
node04.example.jp
IP:192.168.20.41
consul client 01
apach01
node02.example.jp
IP:192.168.20.22
consul server 02
node03.example.jp
IP:192.168.20.23
consul server 03
node05.example.jp
IP:192.168.20.42
consul client 02
apach02
consul操作script等
consul操作script等
普通この手のクライアントサーバな構
成のものの場合、何かをしたい場合は
サーバに問い合わせるイメージです
が、consulの場合、自身のホストにあ
るconsulクライアントを使用するの
が基本形です。
つまりこの線の部分がconsulへの操作
や問い合わせになります。
26. またこの図ですが ※色々省略してます
node01.example.jp
IP:192.168.20.21
consul server 01
node04.example.jp
IP:192.168.20.41
consul client 01
apach01
node02.example.jp
IP:192.168.20.22
consul server 02
node03.example.jp
IP:192.168.20.23
consul server 03
node05.example.jp
IP:192.168.20.42
consul client 02
apach02
consul操作script等
consul操作script等
consulクライアントは自身のconsul
クラスタとしてのjoinや通信により、
consulサーバとリンクしている状態
にあります。
つまり、consulクライアントへの操作や問い合わ
せはconsulサーバへ操作や問い合わせをしている
のと同等に近い動作をするようになっています。
この辺りがconsulを使う場合の基本となります。
※必須ではありませんが