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
クックパッドのログをいい感じにしているアーキテクチャ / Logging architectu...
Search
Hokuto Hoshi
July 26, 2017
Technology
23
15k
クックパッドのログをいい感じにしているアーキテクチャ / Logging architecture at Cookpad
Cookpad Tech Kitchen #9
https://cookpad.connpass.com/event/60831/
Hokuto Hoshi
July 26, 2017
Tweet
Share
More Decks by Hokuto Hoshi
See All by Hokuto Hoshi
Connecting organisation with Technology
kanny
0
190
Why Slack - 5 years of Cookpad with Slack
kanny
0
69
Security by builders - セキュリティ監視をクラウドで「つくる」 / Security by builders
kanny
7
2.7k
セキュリティ担当者から見た re:Invent と AWS Security Hub / Impression of re:Invent and AWS Security Hub
kanny
2
4.2k
自由でセキュアな環境のつくりかた / Building free and secure cloud environment
kanny
1
4.8k
事例でわかる、AWS 運用を支える サポート活用方法と エンタープライズサポートという選択 / AWS Enterprise Support and Cookpad
kanny
2
2.4k
AWS で加速する機械学習 / Accelerate Machine Learning with AWS
kanny
1
1k
クックパッドの機械学習を支える基盤のつくりかた / Machine Learning ops at Cookpad
kanny
4
8.7k
cookpad.com 全 HTTPS 化の軌跡
kanny
30
22k
Other Decks in Technology
See All in Technology
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
1
230
kargoの魅力について伝える
magisystem0408
0
200
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
生成AIのガバナンスの全体像と現実解
fnifni
1
180
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
110
UI State設計とテスト方針
rmakiyama
2
260
Kubeshark で Kubernetes の Traffic を眺めてみよう/Let's Look at k8s Traffic with Kubeshark
kota2and3kan
3
370
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
94
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Designing for humans not robots
tammielis
250
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Transcript
ΫοΫύουͷϩάΛ ͍͍ײ͡ʹ͍ͯ͠Δ ΞʔΩςΫνϟ 2017/07/26 Cookpad Tech Kitchen #9 Hokuto Hoshi
[email protected]
ే (΄͠ ΄͘ͱ) / @kani_b • ΫοΫύουגࣜձࣾ ΠϯϑϥετϥΫνϟʔ෦ •
SRE • AWS ͱηΩϡϦςΟ͕ϝΠϯྖҬ • ࣾ֎ͷใηΩϡϦςΟશൠ୲
ࠓͷςʔϚ: ϩά
https://speakerdeck.com/kanny/miao-jian-shu-mo-falseroguwoiigan-zinisuruakitekutiya
ͳͥɺਓϩάΛूΊΔͷ͔
“ى͖ͨ͜ͱ” ϩά͚͕ͩࣔ͢ • αʔϏεվળͷͨΊʹඞཁෆՄܽ • Ծઆͷݕূ • ύϑΥʔϚϯεվળ • γεςϜτϥϒϧͷղফ
• etc…
ऩू͍ͯ͠Δϩά • PV ϩά • ϖʔδӾཡ͝ͱʹه͞ΕΔ • ӾཡɺݕࡧಈͷੳͳͲ • ࠂܥϩά
• ΠϯϓϨογϣϯɺΫϦοΫɺ ίϯόʔδϣϯ • ৴੍ޚޮՌଌఆʹ • ΞΫςΟϏςΟϩά • Ϣʔβߦಈ (ը໘ભҠͳͲ) • ੳɺࢪࡦݕূɺ ϞόΠϧΞϓϦͷಈ࡞ϩά • ࠪϩά • Ϣʔβσʔλͷ࡞ɾߋ৽ɾ আɺϩάΠϯϩάͳͲ • αϙʔτɺηΩϡϦςΟࠪ
ऩू͍ͯ͠Δϩά • KPI ༻ϩά • “ग़དྷࣄ” Λه͢Δϩά • UU, DU
ͳͲࣗಈܭࢉɺ KPI ཧ༻ • γεςϜϩά • OSɺϛυϧΣΞͷϩά • γεςϜཧ༻ • etc…
ݱࡏͷن • Fluentd ʹྲྀΕ͍ͯΔϩά (֓ࢉ) • σʔλ૯ྔ: 400~600GB /
• Ϩίʔυ: 8ԯϨίʔυҎ্ / • ඵؒ8,000 ~ 25,000 Ϩίʔυ͘Β͍ ※ࡢͷൃද͔࣌ΒϨίʔυͷݮΛ͍ͯ͠·͢
ཁ͍Ζ͍Ζͳϩά͕ ͍ͬͺ͍͋Δ
ϩάʹٻΊΔཁ݅ • ࣮֬ʹૹ͞ΕΔ͜ͱ • Ͱ͖Δ͚ͩԆ͕গͳ͍͜ͱ • ྔΛݮΒ͢ (αϯϓϦϯά) ඞཁ͕ͳ͍͜ͱ •
ੳ͍͢͠ܗͰอ࣋Ͱ͖Δ͜ͱ
ϩάͷҰੜ • ͋ͭΊͯ • ॲཧͯ͠ • ͔ͭ͏ ͜ͷΜͷΛ͠·͢
ΫοΫύουͷ ϩάऩू (αʔϏεͰར༻͍ͯ͠Δͷ)
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
-PH "HHSFHBUPS ,JOFTJT 4USFBNT "QQ4FSWFST 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI
4FSWFS 3FETIJGU $MVTUFS "QQ4FSWFST "QQ4FSWFST "UIFOB &MBTUJDTFBSDI ߏ
ΞϓϦέʔγϣϯαʔό͔Β • ΈΜͳେ͖ fluentd • ਖ਼֬ʹ td-agent • Ͱ͖ΔݶΓసૹઌগͳ͘ •
ूϊʔυ or Kinesis Streams
td-agent ूϊʔυ • ॾࣄʹΑΓ·ͩ 0.12 • શϩά͕ूத͢ΔͨΊߴෛՙ • multiprocess plugin
Ͱ͏·͍͜ͱ͍ͬͯΔ
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Redshift • ࣾͷσʔλੳͷத৺ (DWH) • ϩά͚ͩͰͳࣾ͘ͷશ DB ͷσʔλΛ औΓࠐΜͰ͓Γ౷߹ੳ͕Մೳ •
શࣾһ͕ར༻͢Δ (Tableau Redash) • S3 ͷϩάσʔλΛόονδϣϒͰऔΓࠐΈ • ϩʔυִؒΊ
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Lambda + DynamoDB • ετϦʔϜूܭʹར༻ (ओʹࠂ) • Redshift ͷΠϯϙʔτִؒΛ͑Δ༻్ •
Kinesis Streams Ͱड͚ Lambda Ͱूɺ DynamoDB ʹॻ͘ • ྲྀྔ͕େ͖͍ͨΊूϊʔυΛΘͳ͍ • ϩάͦͷͷ S3 ʹॏෳૹ৴ • ظతͳੳ Redshift Ͱߦ͏
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Elasticsearch • ूܭμογϡϘʔυʹར༻ • αʔϏεʹར༻͞Εͳ͍ • ߴ͍ྲྀྔͷϩάʹΘͳ͍ or αϯϓϦϯά •
Amazon Elasticsearch Service Λར༻
ͦͷଞ • getsentry/sentry • Τϥʔϩάऩूπʔϧ • Rails ΞϓϦέʔγϣϯͷΤϥʔΛૹ৴ • Slack
• Ϣʔβ͔Βͷ͝ҙݟͳͲΛૹ৴
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Athena • ݕূத • Redshift ͷϩʔυִؒΛͯͳ͍͕ SQL Ͱੳ͍ͨ͠έʔε ʹ͏ఆ •
Redshift Spectrum ͱ߹Θͤͯߟ͑த
-PH "HHSFHBUPS ,JOFTJT 4USFBNT "QQ4FSWFST 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI
4FSWFS 3FETIJGU $MVTUFS "QQ4FSWFST "QQ4FSWFST "UIFOB &MBTUJDTFBSDI ߏ
શମ૾ • σʔλετΞπʔϧʹΑΓಘҙෆಘҙ͕͋Δ • ΞϓϦ͔Β৮Δͱྑ͍ͷɺ ਓ͕ؒੳ͍͢͠ͷ (SQL Ͱ৮ΕΔͳͲ) • සൟͳॻ͖ࠐΈ͕ଟ͍ͷɺͦ͏Ͱͳ͍ͷ
• αʔϏεϨϕϧڐ༰Ͱ͖ΔԆɺ༻్ͰબͿ
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS
"UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS Ͱ͖Δ͚͍ͩԆͰ ΞϓϦ͔Βͷར༻ϝΠϯ ͋ΔఔͷԆڐ༰Ͱ͖Δ ΞϓϦ͔Βਓؒར༻ αʔϏεӡ༻্ ΫϦςΟΧϧͰͳ͍ϩάʹར༻
ΫοΫύουͷ ϩάऩू (ͦͷଞ)
ΞϓϦέʔγϣϯͷಈ࡞ϩά • td-agent Ͱऩू • CloudWatch Logs ʹૹ৴ • fluent-plugin-cloudwatch-logs
• Docker Խ͞Ε͍ͯΔΞϓϦඪ४උ • Τϥʔϩά Sentry ʹૹ৴
γεςϜϩά • ݱࡏ2ͭΛฒߦՔಈ • rsyslog • ;ͭ͏ͷϩάαʔό • td-agent Ͱऩूͯ͠
Kinesis Streams -> Lambda Ͱ Graylog • 2.3 ͔Β Elasticsearch Service ͕͑ΔΑ͏ʹ
·ͱΊ • ΫοΫύουͷϩάऩूج൫ʹ͍ͭͯ ͓͠·ͨ͠ • த৺ʹͳ͍ͬͯΔͷ S3 ͱ Redshift •
αʔϏεϨϕϧɺԆɺ༻్ʹΑͬͯ దͳͷΛબ͍ͯ͘͠