Upgrade to Pro — share decks privately, control downloads, hide ads and more …

我々はZOZOTOWNのクラウドジャーニーを通じて何を学んだのか?

 我々はZOZOTOWNのクラウドジャーニーを通じて何を学んだのか?

Developers Summit 2020プレゼンテーション資料
Event: https://event.shoeisha.jp/devsumi/20200213/session/2338/
関連記事: https://codezine.jp/article/detail/11990

Yoichi Kawasaki

February 13, 2020
Tweet

More Decks by Yoichi Kawasaki

Other Decks in Technology

Transcript

  1. ˜;0;05FDIOPMPHJFT *OD גࣜձࣾ;0;0ςΫϊϩδʔζ ։ൃ෦ ;0;0508/ϦϓϨʔενʔϜ ΤϯδχΞ ઒࡚ ༱ࢢ Yoichi Kawasaki

    աڈʹɺϠϑʔגࣜձࣾʹͯΠϯλʔωοταʔϏεͷج൫ϓϥοτ ϑΥʔϜ։ൃΤϯδχΞɺϚΠΫϩιϑτʹͯΤϯλʔϓϥΠζݕࡧ ͷίϯαϧɺΫϥ΢υͷιϦϡʔγϣϯΞʔΩςΫτ౳Λܦͯɺݱࡏ͸ ;0;0ςΫϊϩδʔζͰ;0;0508/ͷΫϥ΢υ࡮৽ϓϩδΣΫτͷ ୲౰ΤϯδχΞɻ ଞɺۀ຿֎Ͱ/P0QT+BQBOίϛϡχςΟʔӡӦ 2 @yokawasa https://github.com/yokawasa
  2. ˜;0;05FDIOPMPHJFT *OD IUUQT[P[PKQ ˔ ೔ຊ࠷େڃͷϑΝογϣϯ௨ൢαΠτ ˔  Ҏ্ͷγϣοϓɺ Ҏ্ͷϒϥϯυͷऔΓѻ͍ʢͱ΋ ʹ೥݄຤࣌఺ʣ

    ˔ ৗ࣌ສ఺Ҏ্ͷ঎඼ΞΠςϜ਺ͱຖ೔ฏۉ ఺Ҏ্ͷ৽ண ঎඼Λܝࡌ ˔ ଈ೔഑ૹαʔϏε ˔ ΪϑτϥοϐϯάαʔϏε ˔ πέ෷͍ ͳͲ 4
  3. ˜;0;05FDIOPMPHJFT *OD IUUQTXFBSKQ 6 ˔ ೔ຊ࠷େڃͷϑΝογϣϯίʔσΟωʔτΞϓϦ ˔  ສμ΢ϯϩʔυಥഁɺίʔσΟωʔτ౤ߘ૯਺͸ສ݅ Ҏ্ʢͱ΋ʹ೥݄຤࣌఺ʣ

    ˔ શੈքʢ"QQ4UPSF(PPHMF1MBZ͕ར༻ՄೳͳશͯͷࠃʣͰμ ΢ϯϩʔυ͕Մೳ ˔ ສਓҎ্ͷϑΥϩϫʔΛ࣋ͭϢʔβʔʢ8&"3*45"ʣ΋஀ੜ
  4. ˜;0;05FDIOPMPHJFT *OD IUUQT[P[PKQNVMUJTJ[F ˔ ਎௕ͱମॏΛબ୒͢Δ͚ͩͰཧ૝ͷαΠζͷ঎඼͕ݟ͔ͭΔ৽͠ ͍༸෰ͷങ͍ํ ˔ ;0;046*5Ͱಘͨສ݅Ҏ্ͷମܕσʔλΛ׆༻͠ɺʙ αΠζͷϚϧναΠζʢଟαΠζʣʹల։ ˔

    ೥ळౙΞΠςϜ͔ΒɺਓؾϒϥϯυͷϚϧναΠζΞΠς ϜΛൢച։࢝ ʲࢀՃاۀʳ גࣜձࣾΞʔόϯϦαʔνɺגࣜձࣾετϥΠϓΠϯλʔφγϣφϧɺ גࣜձࣾσΠτφɾΠϯλʔφγϣφϧɺגࣜձࣾύϧɺגࣜձࣾϏʔϜεɺ גࣜձࣾϕΠΫϧʔζɺ."3,45:-&3גࣜձࣾɺϦʔόΠɾετϥ΢ε δϟύϯגࣜձࣾ ͳͲ 7
  5. ˜;0;05FDIOPMPHJFT *OD 10 DevOps is the practice of developers being

    responsible for operating their services in production, 24/7. This includes development using shared infrastructure primitives, testing, on-call, reliability engineering, disaster recovery, defining SLOs, monitoring setup and alarming, debugging and performance analysis, incident root cause analysis, provisioning and deployment, etc. The human scalability of “DevOps” https://medium.com/@mattklein123/the-human-scalability-of-devops-e36c37d3db6a ϦϓϨʔενʔϜͷ׆ಈͱΑ͘ࣅ͍ͯΔ &OWPZ։ൃऀʹΑΔ%FW0QTఆٛ
  6. ˜;0;05FDIOPMPHJFT *OD 11 DevOps is the practice of developers being

    responsible for operating their services in production, 24/7. This includes development using shared infrastructure primitives, testing, on-call, reliability engineering, disaster recovery, defining SLOs, monitoring setup and alarming, debugging and performance analysis, incident root cause analysis, provisioning and deployment, etc. The human scalability of “DevOps” https://medium.com/@mattklein123/the-human-scalability-of-devops-e36c37d3db6a ϦϓϨʔενʔϜͷ׆ಈͱΑ͘ࣅ͍ͯΔ &OWPZ։ൃऀʹΑΔ%FW0QTఆٛ YͰຊ൪αʔϏεӡ༻ʹ੹೚Λ࣋ͭͱ͍͏։ൃऀʹΑΔ׆ಈ ͜ͷ׆ಈʹ͸ɺ։ൃɺςετɺPODBMMɺ৴པੑͷͨΊͷΤϯδχΞϦϯά׆ಈɺ ࡂ֐෮چɺ4-0ͷఆٛɺ؂ࢹઃఆͱɺσόοάͱύϑΥʔϚϯε෼ੳɺ໰୊ͷࠜຊݪ Ҽ෼ੳɺιϑτ΢ΣΞͷॳظઃఆͱల։ͳͲؚ͕·Ε·͢ɻ
  7. ˜;0;05FDIOPMPHJFT *OD Azure ࢀরܥ"1*ΞʔΩςΫνϟ 16 Azure SQL Database on-premises IIS

    Server SQL .asp Data Center AKS pods "1*ݺͼग़͠ "1*Խ ૄ݁߹ ϦϓϨʔεର৅
  8. ˜;0;05FDIOPMPHJFT *OD αʔϏεˍιϑτ΢ΣΞελοΫ 18 Container Orchestrator Datastore Workflow Web /

    App Automation / Configuration Observability CI/CD, Code Repository SQL Server Azure DB for PostgreSQL RDS for SQL RDS for PostgreSQL AKS Ansible Kustomize CircleCI GitHub ArgoCD
  9. ˜;0;05FDIOPMPHJFT *OD Ϋϥ΢υ͸੹೚ڞ༗Ϟσϧ Ϋϥ΢υϕϯμʔͱར༻ऀͷ؅ཧݖݶʹԠͨ͡੹೚෼୲ͷߟ͑ํ 22 • ($1ྫɿʮΞϓϦϨϕϧͰͷσʔλ੍ޚʯ ͸ར༻ऀͷ੹೚ • "[VSFྫɿαʔϏεϞσϧผϕϯμʔͱར༻

    ऀͷ੹೚෼୲ʢӈਤʣ 総務省 ICTスキル総合習得教材 2-3: クラウドの特性とセキュリティ https://www.soumu.go.jp/ict_skill/pdf/ict_skill_2_3.pdf ଟ͔Εগͳ͔Ε؅ཧ੹೚͸ར༻ऀͰ͋Δࣗ෼ ͨͪʹ͋Δ͜ͱΛೝࣝ͠ɺΦʔφʔγοϓΛ ࣋ͬͯରࡦΛߦ͏͜ͱ
  10. ˜;0;05FDIOPMPHJFT *OD ࢀরܥ"1*ͷओͳճ෮ੑػೳ ϚϧνΤϯυϙΠϯτɾΫϥελͷෛՙ෼ࢄ • --#ͱLT3FBEJOFTT-JWFOFTT1SPCF • ױ෦Λ੾Γ཭ͤΔߏ੒ʢӡ༻ऀʹͱͬͯ`੾Γ཭ͤΔ`ͱ͍͏৺ཧత҆৺ײ͸ઈେʣ ΞϓϦͷΦʔτώʔϦϯά •

    ,VCFSOFUFTΦʔτώʔϦϯάػೳ "1*ϦΫΤετͷϦτϥΠ • ϚϧνΫϥ΢υؒͰͷϦΫΤετͷϦτϥΠʴྲྀྔׂ߹੍ޚ "1*ϦΫΤετͷαʔΩοτϒϨʔΧʔ • ແݶϦτϥΠ๷ࢭ 25
  11. ˜;0;05FDIOPMPHJFT *OD ෆ֬ఆཁૉʢ$IBPTʣ ;0;0508/ओཁηʔϧΠϕϯτʹࡍͯ͠ɺࣄલʹे෼ͳ४උ Λߦͬͨʹ΋͔͔ΘΒͣ૝ఆ௨Γͷ݁Ռ͕ಘΒΕͳ͔ͬͨ • ૝ఆΛ௒͑ΔαʔϏεΞΫηε਺ɺύλʔϯ • ૝ఆ֎ͷϘτϧωοΫ •

    ૝ఆ֎ͷಈ͖Λͯ͘͠Εͳ͍Ϋϥ΢υαʔϏε ৗʹෆ֬ఆཁૉʢ$IBPTʣ͕͋Δ͜ͱΛҙࣝ͠ɺ͍ͣΕͷ໰୊͕ൃੜ ͯ͠΋αʔϏεΛܧଓͰ͖ΔΑ͏ʹඋ͑Δඞཁ͕͋Δ 28
  12. ˜;0;05FDIOPMPHJFT *OD ڥքઢʹજΜͰ͍ͨѱຐ ෛՙࢼݧͰ͸ݟ͑ͯ͜ͳ͍ຊ൪ΞΫηεͰҾ͖ى͜͞Εͨ૝ఆ֎ͷ໰୊ 30 SQL Database Azure Cache For

    Redis 参照系APIアプリ 参 照 ク エ リ クエリ結果 キャッシュ ΞϓϦͱ%#3FEJTͷ઀ଓ • %#ෛՙܰݮͷͨΊʹΫΤϦ݁ՌΛ3FEJT$BDIF αʔϏεʹΩϟογϡ͢Δߏ੒ ൃੜͨ͠ࣄ৅ • ௨ৗͱൺ΂ΞΫηε਺͕૿େ͢Δ;0;0508/ ओཁηʔϧΠϕϯτ࣌ʹ3FEJT$BDIFαʔϏε ͷ$16͕ͰுΓ෇͘ • ͜ͷͱ͖3FEJT΁ͷϦΫΤετظ଴௨Γʹ 5JNFPVUͰ໭Βͣɺ݁ՌϢʔβʔϦΫΤετͷ 5JNFPVU͕සൃ • 3FEJT$16͕͕༠ൃͨ͠૝ఆ֎ͷࣄ৅
  13. ˜;0;05FDIOPMPHJFT *OD ίετ࡟ݮରࡦྫ r %#ίΞͷεέʔϧมߋ Ұ೔ͷ%#ͷ$16ෛՙঢ়گͷنଇੑΛར༻ͨ͠%#ίΞ਺มߋͷࣗ ಈεέδϡʔϦϯάΛ࣮ࢪɻෛՙ͕௿͍࣌ؒଳͷίΞ਺Λௐ੔͠ ͯίετ࡟ݮ͢ΔΞϓϩʔν 32 ある平日のDB(SQL)のCPU負荷推移グラフ

    深夜帯 ෛՙ͕௿͍࣌ؒଳʹ%#Ϋϥελͷߏ੒ϊʔυ਺ͱ શମͷίΞ਺ΛԼ͛ΔεέδϡʔϥʔΛ։ൃɻ ͜ΕʹΑΓෛՙ͕௿͍ਂ໷ଳͷίετ࡟ݮʹ੒ޭ ͳ͓ɺݱࡏ͸࣮ࡍͷෛՙʹԠͨ͡ಈతεέʔϥʔ Λ։ൃத