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
170
Why Slack - 5 years of Cookpad with Slack
kanny
0
62
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
990
クックパッドの機械学習を支える基盤のつくりかた / Machine Learning ops at Cookpad
kanny
4
8.7k
cookpad.com 全 HTTPS 化の軌跡
kanny
30
22k
Other Decks in Technology
See All in Technology
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Platform Engineering for Software Developers and Architects
syntasso
1
520
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
We Have a Design System, Now What?
morganepeng
50
7.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Building Adaptive Systems
keathley
38
2.3k
Designing Experiences People Love
moore
138
23k
Designing for humans not robots
tammielis
250
25k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How to Ace a Technical Interview
jacobian
276
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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 •
αʔϏεϨϕϧɺԆɺ༻్ʹΑͬͯ దͳͷΛબ͍ͯ͘͠