Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
マイクロサービスアーキテクチャの話 / Micro service architecture
Search
iwashi
November 27, 2022
Technology
0
150
マイクロサービスアーキテクチャの話 / Micro service architecture
マイクロサービスアーキテクチャについてお話したときのスライド
iwashi
November 27, 2022
Tweet
Share
More Decks by iwashi
See All by iwashi
マネージャー&リーダー向け 社内トレーニング / Training of management and leadership for Stockmark
iwashi86
48
28k
30分でわかる「エンジニアのためのドキュメントライティング」- インフラエンジニアBooks / Docs for Developers within 30 minutes
iwashi86
9
2k
エンジニアのためのドキュメントライティング / Docs for Developers
iwashi86
29
17k
なぜ変化を起こすのが難しいのか? - 数年以上にわたって難しさに向き合い・考え取り組んできたこと / The reason why changing organization is so hard - What I thought and faced for more than several years
iwashi86
59
80k
2015年 第4四半期の WebRTC 標準化 アップデート / 2015 update of WebRTC Standards
iwashi86
0
170
外注が主な企業でどのように内製開発を立ち上げ・進化させているのか? / how we start in-house developement in enterprise?
iwashi86
2
29k
Extreme testing of WebRTC Applications
iwashi86
0
120
2019 IaaS Workshop in training for new employee at NTT Com
iwashi86
0
100
2017 SkyWayを使いこなすために / How to use SkyWay (WebRTC) in 2017
iwashi86
0
410
Other Decks in Technology
See All in Technology
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
130
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
350
反実仮想機械学習とは何か
usaito
PRO
7
2.4k
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
700
なぜ NOT A HOTEL が Web3 に取り組むのか - NOT A HOTEL TECH TALK
ynunokawa
0
160
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
130
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
150
Data and AI Governance: Existing Challenges and Emerging Trends
scotthsieh825
0
160
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
110
0→1開発における技術選定において一番大切なこと
bicstone
1
330
ChatworkのSRE部って実は 半分くらいPlatform Engineering部かもしれない
saramune
0
100
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Code Reviewing Like a Champion
maltzj
513
39k
Designing with Data
zakiwarfel
95
4.8k
The Language of Interfaces
destraynor
151
23k
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
Designing for humans not robots
tammielis
247
25k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.4k
Designing the Hi-DPI Web
ddemaree
276
33k
Facilitating Awesome Meetings
lara
41
5.6k
BBQ
matthewcrist
80
8.7k
The Pragmatic Product Professional
lauravandoore
24
5.8k
KATA
mclloyd
14
12k
Transcript
マイクロサービスアーキテクチャの話 2015/1/15 @iwashi86 みんなで構築・運用の話をしよう 第1回
•Attribute ・Name -> Yoshimasa IWASE ・Twitter -> @iwashi86 ・Web
-> iwashi.co •Work @ NTT Communications ・SkyWay(WebRTC)の裏側の開発運用 ・HTML5 Experts.jpというWebメディアの編集 2
今日のテーマ: マイクロサービスアーキテクチャ
バズった原典 http://martinfowler.com/articles/microservices.html
• アプリケーションを複数のサービスを組み合わせて 構築する • サービス間通信は、HTTP経由のAPIか軽量メッセー ジング(ex. RabbitMQ)を利用 •
サービス自体は独立してデプロイ&動作可能 In a nutshell
なんでもかんでも マイクロサービスアーキテクチャ?
http://martinfowler.com/articles/microservices/images/sketch.png モノリシック Web / AP / DB を全て含むタイプ (ex. Rails)
http://martinfowler.com/articles/microservices/images/sketch.png モノリシック Web / AP / DB を全て含むタイプ (ex. Rails)
マイクロサービス それぞれの機能が 独立しているタイプ
http://martinfowler.com/articles/microservices/images/sketch.png モノリシック Web / AP / DB を全て含むタイプ (ex. Rails)
マイクロサービス それぞれの機能が 独立しているタイプ どっちにも良いところ・悪いところがある なので両方の特徴を知ってから 自身の環境にあわせて選ぼう
• Good – シンプルなので開発期間は比較的に短い、デプロイも簡単 – 比較的に全体像をつかみやすい(特に新入りさん歓迎) • Bad – Big
ball of mud(※)になる – アジリティの欠如 • ひとたび機能変更があると、全部デプロイしたり • Caveat – 決してスケールしないわけじゃない(LBとか使えば?) モノリシックアーキテクチャ ※ 大きな泥団子が直訳だけど、もはやごった煮状態のスパゲッティ状態のサービスを、本スライドでは意味。 http://www.laputan.org/mud/
http://microservices.io/patterns/monolithic.html
http://microservices.io/patterns/monolithic.html これが巨大泥団子
http://microservices.io/patterns/monolithic.html これが巨大泥団子 素敵なスパゲッティ
• Good – サービスごとに独立してデプロイ&スケールできる – 影響範囲が明確 – チームごとにパラレルに開発しやすい – 特定の技術へのロックインを避けやすい
• Bad – 複雑になる(可動部分・結合部分が多いので) – サービスモニタリングがより大変 マイクロサービスアーキテクチャ ※ 大きな泥団子が直訳だけど、もはやごった煮状態のスパゲッティ状態のサービスを、本スライドでは意味。 http://www.laputan.org/mud/
独立してデプロイ& スケール 分岐点が明確 こっちはRails こっちはdjango http://microservices.io/patterns/microservices.html
マイクロサービスアーキテクチャ について、もうちょっとkwsk
9つの特徴 1. Componentization via Services 2. Organized around Business Capabilities
3. Products not Projects 4. Smart endpoints and dumb pipes 5. Decentralized Governance 6. Decentralized Data Management 7. Infrastructure Automation 8. Design for Failure 9. Evolutionary Design
1. Componentization via Services • マイクロサービスでは、主要な機能はライブラリではなく 別プロセスで動作するサービスとして切り出す (コンポーネントとは別) •
良い所 – IFが明確で疎結合にできる – デプロイがコンポーネント単位で済む • (前提:用語) – コンポーネント:ライブラリ内の関数呼び出しで完結する要素 – サービス:HTTP APIやRPCで呼び出しする要素
2. Organized around Business Capabilities • ビジネス能力にもとづいてチームを分割しよう • だってコンウェイの法則に従って、 チーム構造とシステム構造は同じになるから
• 詳細は図にて
http://martinfowler.com/articles/microservices/images/conways-law.png
じゃなくて http://martinfowler.com/articles/microservices/images/conways-law.png
http://martinfowler.com/articles/microservices/images/PreferFunctionalStaffOrganization.png
人数にもよるが、割とフルス タックな能力が求められる (ex. UX, Web, NW, DB, PM) http://martinfowler.com/articles/microservices/images/PreferFunctionalStaffOrganization.png
3. Products not Projects • 今まで – アプリケーション開発は 「期限のあるプロジェクト」として管理しておいて 開発がおわってデプロイして終わり
• マイクロサービスだと – 継続的なプロダクトとして開発運用していく で、ビジネスとして価値を高める – Amazonの build it / run it 精神 • 作ったもの24時間365日、運用まで含めて責任を持つ ⇒ 深夜にたたき起こされたくなくて品質を高めようと頑張る (DevOpsな感じですね)
4. Smart endpoints and dumb pipes • クラウド界隈でいえば
OpenStackな感じ http://c204396.r96.cf1.rackcdn.com/nova-cactus-logical.gif
5. Decentralized Governance • 中央集権型 ⇒ 単一のプラットフォームになりがち ⇒ 活動の抑制につながる • 分割統治(マイクロサービスアーキテクチャだと)
– 標準化された技術がベストなわけじゃない – 自身の問題解決に適した言語やDBを選択しよう – たとえばあるサービスはC++でも良いし、 あるサービスはNode.jsで作っても良い (上記実現は、アーキテクチャが疎結合だと特に容易)
6. Decentralized Data Management • 一括管理できる統合データベースを作るのじゃなくて それぞれのサービスでデータベースを持とう • (ただし、一貫性を保つのは結構大変)
7. Infrastructure Automation • 説明するより見たほうが早し:
7. Infrastructure Automation 引用:http://www.athlsolutions.com/web/Portals/0/news/N_2014.10.07_01z1.jpg
7. Infrastructure Automation 引用:http://www.athlsolutions.com/web/Portals/0/news/N_2014.10.07_01z1.jpg 要は自動化してCI/CDしよう
8. Design for Failure • 外部のサービスはいつの間にか死んでいるかもしれない • またいつの間にか復旧しているかもしれない なので・・・
8. Design for Failure • 外部のサービスはいつの間にか死んでいるかもしれない • またいつの間にか復旧しているかもしれない なので・・・
• マイクロサービスアーキテクチャでは、 サービス障害の影響を常に考慮しておく • また自身の提供するサービス障害はいち早く検知する
9. Evolutionary Design • サービス単位に進化できるような設計にする • 進化させる場合は – アップグレード –
廃棄(コンテナちっく) ← こっちがオススメ • Blue Green な Deploy とか
まとめ(再掲) 1. Componentization via Services 2. Organized around Business Capabilities
3. Products not Projects 4. Smart endpoints and dumb pipes 5. Decentralized Governance 6. Decentralized Data Management 7. Infrastructure Automation 8. Design for Failure 9. Evolutionary Design