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
Cacoo with Microservices
Search
Kohei
November 28, 2018
Technology
0
1.7k
Cacoo with Microservices
Kohei
November 28, 2018
Tweet
Share
More Decks by Kohei
See All by Kohei
なぜ Go はマイクロサービスのための言語なのか - Why Go is a language for microservices
cohhei
11
7.7k
Other Decks in Technology
See All in Technology
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
Engineer Career Talk
lycorp_recruit_jp
0
160
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
Platform Engineering for Software Developers and Architects
syntasso
1
520
AGIについてChatGPTに聞いてみた
blueb
0
130
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Gamification - CAS2011
davidbonilla
80
5k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Thoughts on Productivity
jonyablonski
67
4.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Happy Clients
brianwarren
98
6.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Facilitating Awesome Meetings
lara
50
6.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Transcript
Cacoo ͳͥ Kubernetes ʹΑΔ microservices ͷಓΛબΜͩͷ͔ʁ Alternative Architecture DOJO Offline
#1
ϒϩάಡΜͰͶɻ͓ΘΓ
- Cacoo ͷ։ൃνʔϜ͕ͲΜͳ՝Λ๊͍͔͑ͯͨ - Կނ microservices ͷಓΛબΜ͔ͩ - ͲΜͳٕज़ΛબΜ͔ͩ -
microservices Խͯ͠Ͳ͏͔ͩͬͨ - ݱঢ়ͷ՝
Kohei Kimura @cohhei 20181݄ Nulab ೖࣾ Cacoo νʔϜͷόοΫΤϯυΤϯδχΞ ΄΅ Go
Ԭ
Cloud-based diagrams, the easy way. Diagram maker for companies, teams,
and you
None
՝1: ϞϊϦγοΫͳΞϓϦέʔγϣϯ
ґଘؔ Ξοϓσʔτ Πϯϑϥ ։ൃޮ ௐࠪ ։ൃޮ Өڹௐࠪ ϨΨγʔ ίϛϡχ έʔγϣϯ
ϞϊϦε ίϛϡχ έʔγϣϯ ϦϙδτϦ Ωϟον Ξοϓ CI/CD εέʔϧ ίϛϡχ έʔγϣϯ
՝2: ϝϯςφϯε͕ऴྃͨ͠ ϑϨʔϜϫʔΫϥΠϒϥϦ
None
None
None
✓ αʔϏε͝ͱʹٕज़ΛબͰ͖Δ ✓ ෦తͳมߋ͕༰қʹͳΔ ✓ ʢ͏·͘ઃܭͰ͖ΕʣαʔόʔϦιʔεΛ࠷దԽͰ͖Δ ✓ ʢ͏·͘ઃܭͰ͖Εʣݎ࿚ͳγεςϜʹͳΔ microservices
ඪ: มߋΛ༰қʹ
micro services ෳͷαʔϏεͱDB ϑϩϯτΤϯυͷׂ ҟͳΔٕज़ ϨΨγʔͷߋ৽
ํɾݪଇ
- ໌֬ͳΦʔφʔγοϓ - খ͍͞΄Ͳྑ͍ - εΫϥον͔Βॻ͖ͳ͓ͯ͠ΈΔ - αʔϏεؒͷΠϯλʔϑΣʔεڧ͍ܕ͚ - ։ൃڥαʔϏε͝ͱʹࣗ༝ʹબ
- ϕετϓϥΫςΟεʹै͏
ٕज़ελοΫ
Backend/Middleware - Kubernetes - Protocol Buffers - gRPC - RabbitMQ
- Go Monitoring/Alerting - Elasticsearch + Kibana - Prometheus + Grafana - Zipkin
Dashboard Editor
Dashboard
None
Editor
None
None
Dashboard Editor
microservices ԽͷྲྀΕ
EC2ظ Kubernetesظ ECSظ - ৽͍͠ػೳΛผαʔϏεͰ - طଘػೳΛΓग़ͯ͠Dockernize - μογϡϘʔυͷαʔϏε -
ECS ͷαʔϏεΛҠߦ
region region Production Cluster Testing Cluster cacoo cacoo-beta cacoo-testing-e2e cacoo-testing-load
cacoo monitoring monitoring storages storages namespaces namespaces stress test by selenium
Scaling - Horizontal Pod Autoscaler - Cluster Autoscaler
Monitoring / Alerting
Logging stdout ops
Metrics - Prometheus & Grafana
None
Metrics - goroutines - memory ͳͲ Alerting - Pod ͷ͕ҎԼʹͳͬͨͱ͖
- Τϥʔ͕େྔʹग़ͨͱ͖ ͳͲ
Zipkin
https://zipkin.io/pages/architecture.html HTTP
Backend/Middleware - Kubernetes - Protocol Buffers - gRPC - RabbitMQ
- Go Monitoring/Alerting - Elasticsearch + Kibana - Prometheus + Grafana - Zipkin
ͰɺͲ͏ʁ
ґଘؔ ‑ - ෦తͳมߋ͘͢͠ͳͬͨ - ϏϧυɾσϓϩΠ͕ߴ - ԬνʔϜ 㱻 ւ֎νʔϜ͕ಠཱ
- Protocol Buffers ͷߋ৽ - ը໘Λލ͙ػೳͷ։ൃ ͷͱ͖
PR/issue Ͱͷίϛϡχέʔγϣϯ
νϟοτͰͷίϛϡχέʔγϣϯ
՝: ৽͍͠ෳࡶੑ
- Seasar ͷґଘ͍ͬͯΔ - αʔϏεΛͲ͜Ͱ۠Δ͔ - αʔϏεՃ͗͢͠ΔͱΠϯϑϥͷෛ୲Ὄ - ίʔυ/yamlͷੑ -
DB Λ·͍ͨͩτϥϯβΫγϣϯ
·ͱΊ
Cacoo ͷ՝ - ݹ͍ϑϨʔϜϫʔΫ - ϞϊϦγοΫͳΞϓϦέʔγϣϯͷڧ͍ґଘؔ - ଟڌͰͷ։ൃ ͦΕΒΛղܾ͢ΔͨΊʹ microservices
Խ - খ͘͞࡞ͬͯ࿈ܞ - গׂͣͭͯ͠͠ ECS ্Ͱӡ༻ - ͦͷޙ Kubernetes
- ΞϓϦέʔγϣϯͷڥքͱΦʔφʔγοϓ͕໌֬ʹ - ܧଓతͳ։ൃ͕͘͢͠ͳͬͨ - ෦తʹมߋ͍͢͠ - ߴͳϏϧυɾσϓϩΠ - ·ͩ·ͩվળ͕ඞཁ
࠷ޙʹ
ͬͯͶɻ
Appendix
Protocol Buffers - αʔϏεؒͷσʔλεΩʔϚ - .proto ϑΝΠϧʹఆٛ - Cacoo Ͱ୯Ұͷ
proto ϦϙδτϦ → git submodule Ͱ֤αʔϏεʹՃ - ιʔείʔυΛੜ
- GraphQL service -> gRPC services - gRPC services ؒ
gRPC - ΞΧϯτɺϑΥϧμʔɺਤ ͳͲ
cacoo-service-account cacoo-service-organization cacoo-service-diagram cacoo-service-folder cacoo-service-subscription cacoo-service-integration Main GraphQL service
RabbitMQ - ෳͷϝοηʔδϯάύλʔϯ - WorkQueue - Publish/Subscribe - Routing -
Topics - RPC - ΤσΟλʔͷฤूΠϕϯτΛ௨͢Δ ͳͲ - εΩʔϚ Protocol Buffers Ͱఆٛ - DB ʹฒͿॏཁͳཁૉ
Kubernetes - OSS - ΤίγεςϜͷڧ͞ - ྫ: helm