「入門監視」からConsulの話

オライリーから出版された「入門監視」に出ているキーワードを掘り下げてみる。まずVagrantやTerraFormで有名なHashiCorpによるConsulというプロダクトから。HashiCorpのサイトでは、他のプロダクトとの関係を、こんな感じで紹介している。

Deynamically discover servicesとあるが、自分が運用しているサービスなのにdiscoverって、どういうことだろう?というわけで、赤いボタンをクリックして詳しく見てみる。

Service discovery via HTTP and DNS simplifies connecting services deployed across distributed infrastructure.

異なるインフラ、つまりオンプレやクラウド、しかも複数のクラウド事業者に跨って設置されたサービスを見つける。ちょっと、これだけだとイメージがわかないので別のページも読んでみる。

The shift from static infrastructure to dynamic infrastructure changes the approach to networking from host-based to service-based. Connectivity moves from the use of static IPs to dynamic service discovery, and security moves from static firewalls to dynamic service segmentation.

左の絵のような静的なインフラから右のような形になり、ホストではなくサービスで管理をすべきだと。うん。わかりやすい。

Consul uses a gossip protocol to manage membership and broadcast messages to the cluster. All of this is provided through the use of the Serf library. The gossip protocol used by Serf is based on "SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol", with a few minor adaptations. There are more details about Serf's protocol here.

このConsulを支えるプロトコルが「ゴシップ」という名前なのが面白い。そして、このSerfは同じくHashicorpがサービスの発見とオーケストレーションのために作った軽量ツールだ。

The health checking provided by Serf is very low level and only indicates if the agent is alive. Consul extends this to provide a rich health checking system that handles liveness in addition to arbitrary host and service-level checks. Health checks are integrated with a central catalog that operators can easily query to gain insight into the cluster.

ConsulはSerf以外にもChefやPuppet、Nagiosといったツールとの違いを教えてくれるページも用意されている。管理ツールは違いがわかりにくいので、こういうページは便利だ。

HashiCorp Consul is a distributed service mesh to connect, secure, and configure services across any runtime platform and public or private cloud. In this episode, Scott Hanselman is joined by HashiCorp's Geoffrey Grossenbach who uses Helm to install a Consul server to Azure Kubernetes Service (AKS) cluster. Next, he deploys and secures a pair of microservices with Consul.

MicrosoftのChannel9ではAzure上でKubernetesに接続するためにConsulを使う12分の動画を公開している。新しいツールは乗り換えるかどうかはともかく、ウォッチしておくだけでも世の中のベストプラクティスを学べる。

今週は「入門監視」に出てくる用語や参照されているドキュメントを読み込んで見るので、「入門監視」を読み終えた人も、これから読んでみようという人も読みに来てください。








この記事が気に入ったらサポートをしてみませんか?