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
Let's visualize your Spring Cloud Applications!...
Search
Shin Tanimoto
November 18, 2016
Programming
5
16k
Let's visualize your Spring Cloud Applications! #jsug #springday
Spring Day 2016 講演資料
2016-11-18
Shin Tanimoto
November 18, 2016
Tweet
Share
More Decks by Shin Tanimoto
See All by Shin Tanimoto
クラウドネイティブ時代のコンテナ環境におけるJavaアプリケーションのメトリクス・ログ・トレースモニタリング
shintanimoto
5
2.2k
26 Java Years
shintanimoto
0
48
Let’s Have Fun with Reactive Programming, Using Reactor and WebFlux
shintanimoto
0
230
Monitoring and Visualizing Your (Micro)services
shintanimoto
0
340
現代に求められるJavaコミュニティとは / What should be the Java Community of Today?
shintanimoto
0
880
人生がときめく「学び」の魔法 / The Life-Changing Magic of Studying
shintanimoto
6
1.6k
業務で使いたいWebFluxによるReactiveプログラミング / Introduction to Reactive Programming using Spring WebFlux
shintanimoto
9
9k
from old Java to modern Java (2017) #jjug
shintanimoto
4
1.6k
Spring Cloud Sleuth + Zipkin with Elasticsearch #zipkin_jp
shintanimoto
1
1.2k
Other Decks in Programming
See All in Programming
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
380
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
2
160
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
1
410
アニメーションを最深まで理解してパフォーマンスを向上させる
mine2424
0
110
Symfony Mapper Component
soyuka
2
610
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
140
Serverless苦闘史
mosh_inc
0
150
MoQとか勉強会#2 発表資料
yuki_uchida
2
670
CSC305 Lecture 26
javiergs
PRO
0
130
イマのCSSでできる インタラクション最前線 + CSS最新情報
clockmaker
5
3.9k
layerx_20241129.pdf
kyoheig3
2
260
talk-with-local-llm-with-web-streams-api
kbaba1001
0
160
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
60
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
A Tale of Four Properties
chriscoyier
157
23k
Into the Great Unknown - MozCon
thekraken
33
1.5k
How GitHub (no longer) Works
holman
310
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
420
Transcript
Let’s Visualize Your Spring Cloud Applications! #sd2016r26 Shin Tanimoto Acroquest
Technology Co., LTD
Copyright © Acroquest Technology Co., Ltd. All rights reserved. ࣗݾհ
2 • ୩ຊ ৺ (Shin Tanimoto) - Acroquest Technologyגࣜձࣾ - ιϦϡʔγϣϯΞʔΩςΫτ - JavaOne / SpringOneεϐʔΧʔ - JJUG / ؔδϟό - Twitter : @cero_t (ຊޠ) - Facebook : shin.tanimoto (ӳޠ)
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3 ຊͷςʔϚɿ Spring Cloud Applicationͷ ʮՄࢹԽʯ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4 ͦͦ Spring Cloud Applicationͱʁ Eureka, Config, Hystrix, Zuul, Session, Stream … ɾɾɾͳͲΛͬͨཁ͢ΔʹϚΠΫϩαʔϏε
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5 αʔϏε͕૿͖͑ͯͨΒ ৭ʑͱେมʹͳΔ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6 #1 ϚΠΫϩαʔϏε։ൃ ͷۤ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. Devͷਓʁ Opsͷਓʁ ྆ํΔਓʁ 7
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 1. ϚΠΫϩαʔϏε։ൃͷۤ Devͷۤ αʔϏεͷ͕Εͯ͠·͍ɺ αʔϏεಉ࢜ͷґଘ͕͔ؔΒͳ͘ͳΔ ͜ͷαʔϏεΛվम͢ΔͱɺͲ͜ʹӨڹ͢Δʁ ͍·ى͖ͨΤϥʔɺͲ͕͜ݪҼͳͷʁ ͦͦΘΕͯͳ͍αʔϏεͳ͍ͷʁ 8
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 1. ϚΠΫϩαʔϏε։ൃͷۤ Opsͷۤ ࢹ͖͢αʔόϓϩηεͷ͕ଟ͍ 1000ݸͷϓϩηεͯ͢ਖ਼ৗʹಈ͍͍ͯΔʁ ϩάϑΝΠϧ͕ࢄͯ͠͠·͏ ͍·ى͖ͨΤϥʔΛௐΔͨΊʹɺ ͲͷϩάϑΝΠϧΛݟΕ͍͍ͷʁ 9
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 1. ϚΠΫϩαʔϏε։ൃͷۤ OpsΛߟྀͨ͠Devͷۤ ͷஹީΛϩά͔Βݕͮ͠Β͍ ͜ͷerrorϝοηʔδແࢹ͍͍ͯ͠ͷʁ ͜ͷinfoϝοηʔδແࢹ͍͍ͯ͠ͷʁ APIͷ༷͚ͩͰͳ͘ɺϩΪϯά༷·Ͱ ࣄલʹશܾͯΊ͖ͬͯकΒͤΔͷʁ 10
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 1. ϚΠΫϩαʔϏε։ൃͷۤ 11 ཱʹΑͬͯۤҟͳΔ͕ ͍ͣΕʹͤΑαʔϏεϩά͕ ૿͑ͨ͜ͱͰ ݟΔ͖ͷ͕ࡶԽ͢Δ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 12 ͦ͜ͰՄࢹԽͰ͢Α
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 13 #2 ՄࢹԽʹ͏πʔϧ܈
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 2. ՄࢹԽʹ͏πʔϧ܈ ຊհ͢Δπʔϧ܈ αʔϏεؒͷґଘੑΛՄࢹԽ Spring Cloud Sleuth + Zipkin ϩάϑΝΠϧΛՄࢹԽ Elasticsearch + Logstash + Kibana + Filebeat αʔόϓϩηεͷঢ়ଶΛՄࢹԽ Elasticsearch + Kibana + Metricbeat 14
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 15 ඦฉҰݟʹ͔ͣ͠
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 2. ՄࢹԽʹ͏πʔϧ܈ Spring Cloud Sleuth + Zipkin 16 ϘτϧωοΫ Λ୳͢
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 2. ՄࢹԽʹ͏πʔϧ܈ Spring Cloud Sleuth + Zipkin 17 αʔϏεؒͷ ґଘੑΛѲ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 2. ՄࢹԽʹ͏πʔϧ܈ Elasticsearch + Logstash + Kibana + Filebeat 18 Ϩϕϧผʹ ϩά݅ΛѲ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 2. ՄࢹԽʹ͏πʔϧ܈ Elasticsearch + Kibana + Metricbeat 19 Ϧιʔεঢ়گ ΛѲ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 20 Ͱߏங͕େมͳΜͰ͠ΐ͏ʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 21 ͍ɺ10ਓ݄Ͱ1000ສԁʹͳΓ·͢ʂ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 22 ɾɾɾͱ͔Ͱͳ͍ͬͯͰ͢ɻ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 23 #3 αʔϏεґଘੑͷ ՄࢹԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ ԿͷͨΊʹΔͷʁ αʔϏεͷվम࣌ʹɺͦͷӨڹൣғΛ֬ೝ͍ͨ͠ Τϥʔ͕ൃੜͨ͠ࡍʹɺ֬ೝ͖͢ൣғΛಛఆ͍ͨ͠ ͠ɺ࣮ࡍʹΘΕ͍ͯͳ͍αʔϏε͕͋Εఀࢭ ͍ͨ͠ → ओʹ։ൃऀ͚ͷՄࢹԽͰ͋Δ 24
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Spring Cloud Sleuth + ZipkinͰαʔϏεґଘੑΛՄࢹԽ Spring Cloud Sleuthͱʁ Distributed Tracing ෳαʔόΛލ͕ΔϦΫΤετʹڞ௨ͷIDΛৼͬͯ ʢHTTP/AMQPϔομͳͲͰͤ͞ͳ͕Βʣ ॲཧΛͰ͖ΔΑ͏ʹ͢ΔΈ Zipkinͱʁ Distributed Tracing Visualization ෳαʔόΛލ͕ΔϦΫΤετΛՄࢹԽ͢Δ 25
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Spring Cloud Sleuth + ZipkinͷΠϝʔδ 26 Microservice1 Microservice2 طʹ࡞ͬͯ͋Δ ϚΠΫϩαʔϏε
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Spring Cloud Sleuth + ZipkinͷΠϝʔδ 27 Microservice1 Microservice2 Zipkin Server HTTP Zipkin UI Server SleuthΛͬͯ ݺͼग़͠ใΛ zipkinʹૹΔ ੵ ՄࢹԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Spring Cloud Sleuth + Zipkinͷద༻ Spring Cloud Sleuth ϚΠΫϩαʔϏεͷpom.xmlͷdependenciesʹ ʮspring-cloud-starter-zipkinʯΛՃ ίʔυͷมߋҰͳ͠ Zipkin ৽نϓϩδΣΫτΛ࡞ͬͯpom.xmlʹ ʮzipkin-serverʯͱʮzipkin-autoconfigure-uiʯΛՃ MainΫϥεΛҰͭ࡞Δ 28
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Zipkinαʔόͷ։ൃ 29 @SpringBootApplication @EnableZipkinServer public class ZipkinApplication { public static void main(String[] args) { SpringApplication.run(ZipkinApplication.class, args); } }
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ Spring Cloud Sleuth + ZipkinͷΠϝʔδ 30 Microservice1 Microservice2 Zipkin Server HTTP Zipkin UI Server Zipkin Client (spring-cloud-starter-zipkin) Zipkin UI (zipkin-autoconfigure-ui) Zipkin Server (zipkin-server)
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 3. αʔϏεґଘੑͷՄࢹԽ 31 Demo
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 32 ͜͏͍͏ࣄ͕؆୯ʹͰ͖Δ͔Β Spring CloudΛ͏Μͩ ͍ͬͯ͏ײ֮ɺ͋Γ·͢
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 33 #4 ϩάͷՄࢹԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 34 ͦͦϩάͬͯ ৗతʹݟͯ·͢ʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 35 ͕ى͖ͨ࿈བྷΛड͚͔ͯΒ ݪҼΛ֬ೝ͢ΔͨΊ͚ͩʹ ϩάΛͬͯͨΓͯ͠·ͤΜʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 36 ৗతʹϩάΛݟͯ ఆ֎ͷࣄ͕ൃੜ͍ͯ͠ͳ͍͔Λ ֬ೝ͢Δ͜ͱͰ αʔϏεϨϕϧ͕֨ஈʹ্͕Δ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 37 ͱݴ͑ɺϩάΛͰݟΔͷແཧɻ ͔ͩΒՄࢹԽ͢ΔΜͰ͢
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ԿͷͨΊʹΔͷʁ ΞϓϦέʔγϣϯϩάͷՄࢹԽ γεςϜ͕҆ఆՔಇ͍ͯ͠Δ͔ͷѲ ఆ͠ͳ͍͕ى͖͍ͯͳ͍͔ʁ ΞΫηεϩάͷՄࢹԽ దʹϨεϙϯεΛฦ͍ͤͯΔ͔Ͳ͏͔ͷѲ HTTPεςʔλεͷ400൪ɺ500൪͕ൃੜ͍ͯ͠ͳ͍͔ʁ ϨεϙϯελΠϜ͕େ͖͘ͳ͍ͬͯͳ͍͔ʁ ٸܹͳΞΫηε૿ͳͲ͕ى͖͍ͯͳ͍͔ͷѲ SNSχϡʔεαΠτͳͲͰऔΓ্͛ΒΕͨʁ ߈ܸΛड͚ͨʁ 38
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ElasticελοΫͰϩάΛՄࢹԽ Elasticsearch ࢄશจݕࡧΤϯδϯɻϩάσʔλΛੵ͢Δ Kibana ՄࢹԽ༻ͷUI Filebeat σʔλసૹπʔϧͰ͋ΔBeatsγϦʔζͷҰͭɻ ϑΝΠϧΛಡΈࠐΈɺLogstashʹసૹ͢Δɻ Logstash σʔλͷՃɾసૹπʔϧ Filebeat͔ΒσʔλΛड͚औΓɺՃͯ͠ɺElasticsearchʹసૹ͢Δ 39
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 40 Microservice1 Microservice2 طʹ࡞ͬͯ͋Δ ϚΠΫϩαʔϏε
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 41 Microservice1 Microservice2 Filebeat Filebeat FilebeatͰ ϩάΛಡΈࠐΈ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 42 Microservice1 Microservice2 Filebeat Filebeat Logstash LogstashͰ ϩάΛύʔεͯ͠ JSONԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 43 Microservice1 Microservice2 Filebeat Filebeat Elasticsearch Kibana Logstash σʔλͷੵ ՄࢹԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ 44 Demo
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ͰͳͥElasticsearchͳͷʁ ElasticελοΫʹΑΔɺऩूɾՃɾੵɾՄࢹԽͷҰ؏ੑ πʔϧͷΈ߹ΘͤΛ໎Θͳ͍͍ͯ͘ Elasticsearchͷෳࡶͳ݅ͰϑΟϧλΛֻ͚ͨ͏͑ͰͷՄࢹԽͳͲ༰қ ʮϩάऩूͱՄࢹԽʯΛతͱͨ͠߹ɺOSSͰଞͷબࢶ͕΄΅ͳ͍ʢ༻ ͰSplunkͳͲ͋Γʣ ʮ࣌ܥྻͷσʔλʯΛѻ͏͍͔ͭ͋͘Δ͕ɺϩάͦͷͷΛѻ͑ Δͷ΄ͱΜͲͳ͍ AWSͷCloud Watch LogsͳͲϩάΛऩू͢Δ͕ɺෳࡶͳϑΟϧλͳͲֻ ͚ΒΕͳ͍ 45
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 4. ϩάͷՄࢹԽ ͰͳͥElasticsearchͳͷʁ ʮ͋ͱ͔Βʯूܭ࣠Λม͑ΒΕΔڧ͞ ࣌ܥྻͷσʔλΛه͢ΔϝτϦΫεπʔϧͰɺͨͱ͑ޙ͔Βʮಛఆͷ Ҭ͔ΒͷΞΫηεʯ͚ͩʹߜͬͨੳͳͲ͕͍͠ ࣄલʹܾΊͨΛੵ͢Δ͜ͱ͕ओతͳͷͰ ϩάϑΝΠϧΛղੳ͢ΔπʔϧͰɺςϥόΠτڃͷղੳΛ͢Δ͜ͱࠔɻ ElasticsearchͳΒݕࡧͷߴ͞ͱ͍͏ྗΛ׆͔ͯ͠ɺूܭ࣠Λม͑ͳ͕Βߴ ʹݕࡧ͕Ͱ͖Δɻ ͭ·Γɺ͍ͬͨΜࡶʹϩάΛElasticsearchʹೖΕ͓͍ͯͯɺ ޙ͔ΒܾΊͨ࣠Ͱੳ͢Δɺͱ͍͏ΞδϦςΟͷߴ͍ରԠ͕औΓ͍͢ 46
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 47 #5 γεςϜϦιʔε ͷՄࢹԽ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 48 ElasticsearchೖΕͨΜͩ͠ ͍ͭͰʹϦιʔεՄࢹԽ͠Α͏ͥ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5. γεςϜϦιʔεͷՄࢹԽ ԿͷͨΊʹΔͷʁ γεςϜ͕҆ఆՔಇ͍ͯ͠Δ͔ͷѲ CPU༻͕ߴಅ͍ͯ͠ͳ͍͔ʁ ϝϞϦ͕ϦʔΫ͍ͯ͠ͳ͍͔ʁ σΟεΫͷ༰ྔ͕ރׇͯ͠ɺγεςϜఀࢭੇલʹͳ͍ͬͯͳ͍͔ʁ ਖ਼ຯͷɺ͜Εօ͞Μɺ͍ͬͯΔͱࢥ͍·͢ɻ ZabbixɺMackerelɺDataDogɺCloud WatchͳͲɺ ྑ͍πʔϧଟ͋Γ·͢ɻ 49
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 50 ͰɺΞΫηε͕ٸ૿ͨ͠ͱ͖ʹ CPU༻͕ͲΕ͙Β͍ʹͳͬͯ ϨεϙϯελΠϜ͕Ͳ͏ͳ͔ͬͨ ૬ؔΛݟͨ͘ͳ͍ʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 51 ElasticsearchͰϦιʔεใ ूΊΕ ϩάใͱϦιʔεใΛ ฒͯ֬ೝͰ͖Δ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5. γεςϜϦιʔεͷՄࢹԽ ElasticελοΫͰϩάΛՄࢹԽ Elasticsearch ࢄશจݕࡧΤϯδϯɻϩάσʔλΛੵ͢Δɻ͖ͬ͞આ໌͠·ͨ͠ɻ Kibana ՄࢹԽ༻ͷUIɻ͖ͬ͞આ໌͠·ͨ͠ɻ Metricbeat Ϧιʔεใͷऩूπʔϧɻ ϦιʔεใΛಡΈऔͬͯɺLogstashʹసૹ͢Δɻ MySQLPostgreSQLɺRedisɺnginxͳͲͷϛυϧΣΞͷAPIΛୟ͍ͯ ใΛऩू͢Δػೳ͋Δʢࠓճઆ໌͠ͳ͍Αʣ 52
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5. γεςϜϦιʔεͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 53 Microservice1 Microservice2 Metricbeat Metricbeat MetricbeatͰ ϦιʔεΛಡΈࠐΈ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5. γεςϜϦιʔεͷՄࢹԽ ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 54 Microservice1 Microservice2 Metricbeat Metricbeat Elasticsearch Kibana σʔλͷੵ ՄࢹԽ Ճ͠ͳ͍ͷͰ Logstashෆཁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 5. γεςϜϦιʔεͷՄࢹԽ 55 Demo
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 56 ͱ͜ΖͰɺ ϩάใͱϦιʔεใ͚ͩͰͳ͘ ͦ͜ʹച্ֹۚͳͲฒΕ ɾɾɾ͋ͱ͔Δͳʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 57 ”CPUεϖοΫ͕Γͳͯ͘ ΞΫηεΛࡹ͘͜ͱ͕Ͱ͖ͣ ͦͷ͍ͤͰചΓ্͕͛མͪ·ͨ͠”
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 58 γεςϜࢿΛଅ͚ͩ͢ͷ ใΛఏڙͰ͖ΔՄೳੑ͕͋Δ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 59 #6 ՄࢹԽͱKafka
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 60 ݴ͍͔͚ͨͬͨͩͪΌ͏Μ͔ͱ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 61 ࠓճͷՄࢹԽͷ͓͞Β͍
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Sleuth + ZipkinͷΠϝʔδ 62 Microservice1 Microservice2 Zipkin Server HTTP Zipkin UI Server
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 63 Microservice1 Microservice2 Filebeat Filebeat Elasticsearch Kibana Logstash
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 64 ͠ZipkinLogstash͕མͪͨΓ ElasticsearchͷΩϟύγςΟΛ ӽ͑ͨΒʁ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 65 ใͷܽམɺͦΕΛ͍͗ͨ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka KafkaΛ༻͍ͨγεςϜͷ҆ఆԽ Apache Kafkaͱ ͻͱ͜ͱͰݴ͏ʮΩϡʔͷΑ͏ͳͷʯ ͨͩ͠աڈ1िؒʢσϑΥϧτઃఆʣͷσʔλΛอ͓࣋ͯ͠Γɺ ͍ͭͰ࠶ૹՄೳ ͍ํ ϚΠΫϩαʔϏε͔ΒZipkinͷؒʹKafkaΛڬΉ BeatsͱLogtashElasticsearchͷؒʹKafkaΛڬΉ 66
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Sleuth + ZipkinͷΠϝʔδ 67 Microservice1 Microservice2 Zipkin Server HTTP Zipkin UI Server
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Sleuth + ZipkinͷΠϝʔδ 68 Microservice1 Microservice2 Zipkin Server Zipkin UI Server Kafka
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Sleuth + ZipkinͷΠϝʔδ 69 Microservice1 Microservice2 Zipkin Server Zipkin UI Server Kafka spring-cloud-sleuth-stream spring-cloud-stream-binder-kafka zipkin-autoconfigure-ui spring-cloud-sleuth-zipkin-stream spring-cloud-stream-binder-kafka
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Sleuth + ZipkinͷΠϝʔδ 70 Name artifactId Log HTTP Kafka Sleuth spring-cloud-starter-sleuth Service Sleuth Stream spring-cloud-sleuth-stream Service Zipkin Client spring-cloud-starter-zipkin Service Zipkin Stream spring-cloud-sleuth-zipkin-stream Zipkin Zipkin UI spring-boot-starter zipkin-autoconfigure-ui Zipkin Zipkin Zipkin Server spring-boot-starter zipkin-server Zipkin Stream Kafka spring-cloud-stream-binder-kafka Both
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 71 Microservice1 Microservice2 Filebeat Filebeat Elasticsearch Kibana Logstash
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka ElasticελοΫʹΑΔՄࢹԽͷΠϝʔδ 72 Microservice1 Microservice2 Filebeat Filebeat Elasticsearch Kibana Logstash Kafka
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka ͳͥKafkaΛ͏ͷ͔ʁ େྔͷΞΫηεʹΑΔՄࢹԽγεςϜશମͷఀࢭΛ͙ ElasticsearchLogstash͕աෛՙʹΑΓఀࢭ͢Δ ͦͷؒʹདྷͨϝοηʔδ͕ফࣦͯ͠͠·͏͜ͱΛ͙ LogstashͷઃఆΛमਖ਼ͨ͠ޙʹɺ࠶ૹͰ͖Δ Logstashͷઃఆʹϛε͕͋Γɺύʔεʹࣦഊͯ͠͠·ͬͯɺ ઃఆΛͨ͠͏͑ͰKafka͔ΒऔΓͤਖ਼͘͠గਖ਼Ͱ͖Δ ཁ͢ΔʹՄࢹԽγεςϜͷ҆ఆԽ ՄࢹԽͷॏཁੑ͕͍߹ɺผʹͳͯ͘ྑ͍ ηΩϡϦςΟ༻్ͰՄࢹԽ͢Δ߹ͳͲɺͥͻೖΕ͍ͨΑͶʁ 73
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 6. ՄࢹԽͱKafka Spring Cloud Streamͷྑ͍ྫͱݴ͑Δ Spring Cloud StreamɺҰݟ͢Εʮࣗʹ͋·Γؔͷͳ͍ͷʯͱ ଊ͑ͯ͠·͍͕ͪ ͰࠓճͷՄࢹԽɺશʹSpring Cloud Streamͱಉ͡ྲྀΕʹͳΔ ʮ͜ͷαʔϏεʗϛυϧΣΞΛࢭΊͯɺϝοηʔδΛܽམͤ͞Δ͜ͱͳ ͘ॲཧͰ͖Δ͔ʁʯͱ͍͏ࢹͰߟ͑ΕɺSpring Cloud StreamͷϝϦοτ ͕·ͨݟ͑ͯ͘Δ ༨ஊ͚ͩͲɺBeatsͱLogstashͷؒόοΫϓϨογϟʔܕͷಠࣗϓϩ τίϧͳͷͰɺ͜͜Λਅʹߟ͑ΔͱɺόοΫϓϨογϟʔͷϝϦοτ ·ͨݟ͑ͯ͘Δɻͦͷ·͍ͨͣΕʂ 74
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. 75 ·ͱΊ
Copyright © Acroquest Technology Co., Ltd. All rights reserved. Copyright
© Acroquest Technology Co., Ltd. All rights reserved. ·ͱΊ DevܥSpring Cloud Sleuth + ZipkinʹΑΔ αʔϏεґଘੑͷՄࢹԽΛ͙͢Δ͖ OpsܥElasticελοΫΛͬͯϩάͷՄࢹԽΛ ͙͢Δ͖ োγεςϜఀࢭ͕ى͖Δ͜ͱେલఏͱͯ͠ɺ KafkaΛ༻͍ͨ҆ఆԽΛݕ౼͢Εɺ ؾ͍ͮͨΒSpring Cloud StreamόοΫϓϨογϟʔͷ ϝϦοτ͕͔ΔΑ͏ʹͳΔΑʂ 76
Copyright © Acroquest Technology Co., Ltd. All rights reserved. 77
Enjoy visualizing your Spring Cloud Applications!