Consul Agent (Client)
DC2DC3DC1
1. Consulについて
1.1 Service Discovery
Consulでサービスの監視を行う事と、登録されたサービスをDNSや
HTTPを介して情報を共有する事が可能になります。
http
db
file
DNS Request
HTTP Request Consul
Server
1. Consulについて
1.2 FailureDetection(HealthChecking)
Consul ClientからServerに対して監視しているサービスやノードの状況を送
信する事が可能。
また、この「状況」に応じてConsul Agentはジョブを実行する事ができます。
Consul Agent
(Server)
Consul Agent (Client)
http
db
file
Response Code
check
Query check
Disk Free(df) check
Watch: Disk Extend
Consul Agent
(Server)
Consul Agent(Client)
http
1. Consulについて
1.2 FailureDetection(Health Checking)
200
200
Not Responding
if code -ne 200 ; then
echo “Caution!”
web-restart.sh
fi
Restart※
※ Consulでは、execというオプション指定で任意のコマン
ドをリーモート実行する事が可能
例) consul exec -node="ノード名" df -h
17.
Consul Agent
(Server)
Consul Agent(Client)
http
1. Consulについて
1.2 FailureDetection(Health Checking)
Not Responding
情報を送信 if code -ne 200 ; then
echo “Caution!”
web-restart.sh
fi
Consul Serverの役割は
1. クライアントの情報を保持
2. クライアントの情報を複製
3. クラスタ化し、管理を容易にする
watch(状態監視)
18.
1. Consulについて
1.3 MultiDatacenter
ConsulAgent (Client)
DC2 DC3DC1
http
db
file
Consul
Server
新たなリージョンが誕生した場合で
も、Consul Server間通信が可能な
NW構成となっていれば、容易に拡
張する事が可能です。
※ 一般的なインターネットグローバ
ル回線を使用している場合はまた
別の話。
対応方法は、consul起動時のオプ
ションに[ -dc newDC ]を追加すれ
ば良いだけ。
(デフォルトはDC1)
Automated a workflowof
the release using Consul
koudaiiiさん
Serfのことを時々でいいので
思い出してください
poisoninghostさん
Consul TemplateでMuninの
監視設定を自動化
zembutsuさん
Consulにコントリビュートした話 foostanさん
2. LT でConsulについて深く・カジュアルに。