Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ΫοΫύουͷϩάΛ ͍͍ײ͡ʹ͍ͯ͠Δ ΞʔΩςΫνϟ 2017/07/26 Cookpad Tech Kitchen #9 Hokuto Hoshi
[email protected]
Slide 2
Slide 2 text
ే (΄͠ ΄͘ͱ) / @kani_b • ΫοΫύουגࣜձࣾ ΠϯϑϥετϥΫνϟʔ෦ • SRE • AWS ͱηΩϡϦςΟ͕ϝΠϯྖҬ • ࣾ֎ͷใηΩϡϦςΟશൠ୲
Slide 3
Slide 3 text
ࠓͷςʔϚ: ϩά
Slide 4
Slide 4 text
https://speakerdeck.com/kanny/miao-jian-shu-mo-falseroguwoiigan-zinisuruakitekutiya
Slide 5
Slide 5 text
ͳͥɺਓϩάΛूΊΔͷ͔
Slide 6
Slide 6 text
“ى͖ͨ͜ͱ” ϩά͚͕ͩࣔ͢ • αʔϏεվળͷͨΊʹඞཁෆՄܽ • Ծઆͷݕূ • ύϑΥʔϚϯεվળ • γεςϜτϥϒϧͷղফ • etc…
Slide 7
Slide 7 text
ऩू͍ͯ͠Δϩά • PV ϩά • ϖʔδӾཡ͝ͱʹه͞ΕΔ • ӾཡɺݕࡧಈͷੳͳͲ • ࠂܥϩά • ΠϯϓϨογϣϯɺΫϦοΫɺ ίϯόʔδϣϯ • ৴੍ޚޮՌଌఆʹ • ΞΫςΟϏςΟϩά • Ϣʔβߦಈ (ը໘ભҠͳͲ) • ੳɺࢪࡦݕূɺ ϞόΠϧΞϓϦͷಈ࡞ϩά • ࠪϩά • Ϣʔβσʔλͷ࡞ɾߋ৽ɾ আɺϩάΠϯϩάͳͲ • αϙʔτɺηΩϡϦςΟࠪ
Slide 8
Slide 8 text
ऩू͍ͯ͠Δϩά • KPI ༻ϩά • “ग़དྷࣄ” Λه͢Δϩά • UU, DU ͳͲࣗಈܭࢉɺ KPI ཧ༻ • γεςϜϩά • OSɺϛυϧΣΞͷϩά • γεςϜཧ༻ • etc…
Slide 9
Slide 9 text
ݱࡏͷن • Fluentd ʹྲྀΕ͍ͯΔϩά (֓ࢉ) • σʔλ૯ྔ: 400~600GB / • Ϩίʔυ: 8ԯϨίʔυҎ্ / • ඵؒ8,000 ~ 25,000 Ϩίʔυ͘Β͍ ※ࡢͷൃද͔࣌ΒϨίʔυͷݮΛ͍ͯ͠·͢
Slide 10
Slide 10 text
ཁ͍Ζ͍Ζͳϩά͕ ͍ͬͺ͍͋Δ
Slide 11
Slide 11 text
ϩάʹٻΊΔཁ݅ • ࣮֬ʹૹ͞ΕΔ͜ͱ • Ͱ͖Δ͚ͩԆ͕গͳ͍͜ͱ • ྔΛݮΒ͢ (αϯϓϦϯά) ඞཁ͕ͳ͍͜ͱ • ੳ͍͢͠ܗͰอ࣋Ͱ͖Δ͜ͱ
Slide 12
Slide 12 text
ϩάͷҰੜ • ͋ͭΊͯ • ॲཧͯ͠ • ͔ͭ͏ ͜ͷΜͷΛ͠·͢
Slide 13
Slide 13 text
ΫοΫύουͷ ϩάऩू (αʔϏεͰར༻͍ͯ͠Δͷ)
Slide 14
Slide 14 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 15
Slide 15 text
-PH "HHSFHBUPS ,JOFTJT 4USFBNT "QQ4FSWFST 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "QQ4FSWFST "QQ4FSWFST "UIFOB &MBTUJDTFBSDI ߏ
Slide 16
Slide 16 text
ΞϓϦέʔγϣϯαʔό͔Β • ΈΜͳେ͖ fluentd • ਖ਼֬ʹ td-agent • Ͱ͖ΔݶΓసૹઌগͳ͘ • ूϊʔυ or Kinesis Streams
Slide 17
Slide 17 text
td-agent ूϊʔυ • ॾࣄʹΑΓ·ͩ 0.12 • શϩά͕ूத͢ΔͨΊߴෛՙ • multiprocess plugin Ͱ͏·͍͜ͱ͍ͬͯΔ
Slide 18
Slide 18 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 19
Slide 19 text
Redshift • ࣾͷσʔλੳͷத৺ (DWH) • ϩά͚ͩͰͳࣾ͘ͷશ DB ͷσʔλΛ औΓࠐΜͰ͓Γ౷߹ੳ͕Մೳ • શࣾһ͕ར༻͢Δ (Tableau Redash) • S3 ͷϩάσʔλΛόονδϣϒͰऔΓࠐΈ • ϩʔυִؒΊ
Slide 20
Slide 20 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 21
Slide 21 text
Lambda + DynamoDB • ετϦʔϜूܭʹར༻ (ओʹࠂ) • Redshift ͷΠϯϙʔτִؒΛ͑Δ༻్ • Kinesis Streams Ͱड͚ Lambda Ͱूɺ DynamoDB ʹॻ͘ • ྲྀྔ͕େ͖͍ͨΊूϊʔυΛΘͳ͍ • ϩάͦͷͷ S3 ʹॏෳૹ৴ • ظతͳੳ Redshift Ͱߦ͏
Slide 22
Slide 22 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 23
Slide 23 text
Elasticsearch • ूܭμογϡϘʔυʹར༻ • αʔϏεʹར༻͞Εͳ͍ • ߴ͍ྲྀྔͷϩάʹΘͳ͍ or αϯϓϦϯά • Amazon Elasticsearch Service Λར༻
Slide 24
Slide 24 text
ͦͷଞ • getsentry/sentry • Τϥʔϩάऩूπʔϧ • Rails ΞϓϦέʔγϣϯͷΤϥʔΛૹ৴ • Slack • Ϣʔβ͔Βͷ͝ҙݟͳͲΛૹ৴
Slide 25
Slide 25 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 26
Slide 26 text
Athena • ݕূத • Redshift ͷϩʔυִؒΛͯͳ͍͕ SQL Ͱੳ͍ͨ͠έʔε ʹ͏ఆ • Redshift Spectrum ͱ߹Θͤͯߟ͑த
Slide 27
Slide 27 text
-PH "HHSFHBUPS ,JOFTJT 4USFBNT "QQ4FSWFST 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "QQ4FSWFST "QQ4FSWFST "UIFOB &MBTUJDTFBSDI ߏ
Slide 28
Slide 28 text
શମ૾ • σʔλετΞπʔϧʹΑΓಘҙෆಘҙ͕͋Δ • ΞϓϦ͔Β৮Δͱྑ͍ͷɺ ਓ͕ؒੳ͍͢͠ͷ (SQL Ͱ৮ΕΔͳͲ) • සൟͳॻ͖ࠐΈ͕ଟ͍ͷɺͦ͏Ͱͳ͍ͷ • αʔϏεϨϕϧڐ༰Ͱ͖ΔԆɺ༻్ͰબͿ
Slide 29
Slide 29 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS
Slide 30
Slide 30 text
,JOFTJT 4USFBNT 4 -BNCEB GVODUJPO %ZOBNP%# #BUDI 4FSWFS 3FETIJGU $MVTUFS "UIFOB &MBTUJDTFBSDI ߏ "QQ4FSWFST "QQ4FSWFST "QQ4FSWFST -PH "HHSFHBUPS Ͱ͖Δ͚͍ͩԆͰ ΞϓϦ͔Βͷར༻ϝΠϯ ͋ΔఔͷԆڐ༰Ͱ͖Δ ΞϓϦ͔Βਓؒར༻ αʔϏεӡ༻্ ΫϦςΟΧϧͰͳ͍ϩάʹར༻
Slide 31
Slide 31 text
ΫοΫύουͷ ϩάऩू (ͦͷଞ)
Slide 32
Slide 32 text
ΞϓϦέʔγϣϯͷಈ࡞ϩά • td-agent Ͱऩू • CloudWatch Logs ʹૹ৴ • fluent-plugin-cloudwatch-logs • Docker Խ͞Ε͍ͯΔΞϓϦඪ४උ • Τϥʔϩά Sentry ʹૹ৴
Slide 33
Slide 33 text
γεςϜϩά • ݱࡏ2ͭΛฒߦՔಈ • rsyslog • ;ͭ͏ͷϩάαʔό • td-agent Ͱऩूͯ͠ Kinesis Streams -> Lambda Ͱ Graylog • 2.3 ͔Β Elasticsearch Service ͕͑ΔΑ͏ʹ
Slide 34
Slide 34 text
·ͱΊ • ΫοΫύουͷϩάऩूج൫ʹ͍ͭͯ ͓͠·ͨ͠ • த৺ʹͳ͍ͬͯΔͷ S3 ͱ Redshift • αʔϏεϨϕϧɺԆɺ༻్ʹΑͬͯ దͳͷΛબ͍ͯ͘͠