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
160
Why Slack - 5 years of Cookpad with Slack
kanny
0
59
Security by builders - セキュリティ監視をクラウドで「つくる」 / Security by builders
kanny
7
2.6k
セキュリティ担当者から見た 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
980
クックパッドの機械学習を支える基盤のつくりかた / Machine Learning ops at Cookpad
kanny
4
8.7k
cookpad.com 全 HTTPS 化の軌跡
kanny
30
22k
Other Decks in Technology
See All in Technology
Gradle: The Build System That Loves To Hate You
aurimas
2
150
ガバメントクラウド先行事業中間報告を読み解く
sugiim
1
1.4k
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
470
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
チームを主語にしてみる / Making "Team" the Subject
ar_tama
4
310
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
3
16k
Forget efficiency – Become more productive without the stress
ufried
0
140
スプリントゴールにチームの状態も設定する背景とその効果 / Team state in sprint goals why and impact
kakehashi
2
100
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.5k
Featured
See All Featured
Optimizing for Happiness
mojombo
376
69k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
The Language of Interfaces
destraynor
154
24k
Scaling GitHub
holman
458
140k
Rails Girls Zürich Keynote
gr2m
93
13k
It's Worth the Effort
3n
183
27k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
GitHub's CSS Performance
jonrohan
1030
460k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
The Invisible Side of Design
smashingmag
297
50k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
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 •
αʔϏεϨϕϧɺԆɺ༻్ʹΑͬͯ దͳͷΛબ͍ͯ͘͠