Skip to Content
Go言語による分散サービス ―信頼性、拡張性、保守性の高いシステムの構築
book

Go言語による分散サービス ―信頼性、拡張性、保守性の高いシステムの構築

by Travis Jeffery, 柴田 芳樹
August 2022
Beginner to intermediate
280 pages
3h 50m
Japanese
O'Reilly Japan, Inc.
Content preview from Go言語による分散サービス ―信頼性、拡張性、保守性の高いシステムの構築

7章サーバ間のサービスディスカバリ

ここまでで、安全なスタンドアロンのgRPCウェブサービスを構築しました。ここからは、スタンドアロンのサービスを分散サービスにするために、クラスタへのノードの追加や削除を自動的に処理できるようにするサービスディスカバリ(service discovery)を導入します。

サービスディスカバリになじみがなくても、心配しないでください。この章を読めばすぐになじめます。サービスディスカバリは、分散サービスの最も優れた点の一つです。マシンが自動的に他のサービスを見つけます(スカイネット†1が自我を持ち、支配するようになったとき、その役割を果たしたサービスディスカバリに感謝できます)。ここでは、サービスディスカバリの多くの利点を簡単に紹介します。

7.1 サービスディスカバリを使う理由

サービスディスカバリとは、サービスに接続する方法を見つけ出す処理です。サービス・ディスカバリ・ソリューションでは、レジストリ(registry)とも呼ばれるサービスの最新リスト、サービスの位置、サービスの健全性を保持する必要があります。下流(downstream)のサービスは、このレジストリを照会して上流(upstream)のサービスの位置を発見し、接続します。たとえば、ウェブサービスがデータベースを発見して接続するような場合です。これにより、上流のサービスが変更されても(規模の拡大や縮小、交換など)、下流のサービスはそれらの上流のサービスへ接続できます†2。

クラウドより前の時代には、手作業で管理および設定された固定アドレスを使って「サービスディスカバリ」を設定できました。それは、アプリケーションが静的なハードウェア上で動作していたために機能していました。ノードが頻繁に変更される最新のクラウドアプリケーションでは、サービスディスカバリが大きな役割を果たしています。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

エンジニアリングマネージャーのしごと ―チームが必要とするマネージャーになる方法

エンジニアリングマネージャーのしごと ―チームが必要とするマネージャーになる方法

James Stanier, 吉羽 龍太郎, 永瀬 美穂, 原田 騎郎, 竹葉 美沙
サイトリライアビリティワークブック ―SREの実践方法

サイトリライアビリティワークブック ―SREの実践方法

Betsy Beyer, Niall Richard Murphy, David K. Rensin, Kent Kawahara, Stephen Thorne, 澤田 武男, 関根 達夫, 細川 一茂, 矢吹 大輔, 玉川 竜司
スクラム実践者が知るべき97のこと

スクラム実践者が知るべき97のこと

Gunther Verheyen, 吉羽 龍太郎, 原田 騎郎, 永瀬 美穂
生成AI時代の価値のつくりかた ―実践者のマインド、スキル、データ、ユースケース

生成AI時代の価値のつくりかた ―実践者のマインド、スキル、データ、ユースケース

Rob Thomas, Paul Zikopoulos, Kate Soule, 本多 真二郎, オライリー・ジャパン編集部

Publisher Resources

ISBN: 9784873119977Other