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

Webシステムアーキテクチャの地図を描く構想 / A map of web systems architecture

Webシステムアーキテクチャの地図を描く構想 / A map of web systems architecture

第5回WebSysmetArchitecture(WSA)研究会 https://websystemarchitecture.hatenablog.jp/entry/2019/07/30/172650

Yuuki Tsubouchi (yuuk1)

September 28, 2019
Tweet

More Decks by Yuuki Tsubouchi (yuuk1)

Other Decks in Research

Transcript

  1. ͘͞ΒΠϯλʔωοτ
    גࣜձࣾ
    (C) Copyright 1996-2019 SAKURA internet Inc
    ͘͞ΒΠϯλʔωοτ
    ݚڀॴ
    WebγεςϜΞʔΩςΫνϟͷ஍ਤ
    Λඳ͘ߏ૝
    2019/09/28 ݚڀһ ௶಺ ༎थ
    id:y_uuki / @yuuk1t
    ୈ5ճWebSystemArchitectureݚڀձ

    View full-size slide

  2. WSAݚڀձͷ໨తͷ1ͭʹ
    ௚઀Ξϓϩʔν͢Δ
    https://websystemarchitecture.hatenablog.jp/purpose
    WebαʔϏεʹඞཁͱͳΔ৘ใ௨৴ج൫γεςϜͷମܥԽ
    WebαʔϏεʹඞཁͱͳΔ৘ใ௨৴ج൫γεςϜʹ͍ͭͯɼݚڀऀɼٕज़ऀɼֶੜ
    Λ໰Θͣɼ޿͘஌ݟަ׵Λߦ͍ɼਂٞ͘࿦͢Δ͜ͱͰମܥԽΛ໨ࢦ͢ɽ

    ·ͨɼମܥԽΛ௨ͯ࣍͡ੈ୅ͷWebαʔϏεج൫ͷ͋Γํʹ͍ͭͯͷఏݴΛߦ͏ɽ

    View full-size slide

  3. 3
    1. ͸͡Ίʹ
    2. ؔ࿈ମܥ
    3. ఏҊମܥ
    4. ·ͱΊ
    ໨࣍

    View full-size slide

  4. 5
    ɾWebαʔϏεͷγεςϜʹର͢Δཁٻ͸ɼεέʔϥϏϦςΟɼߴՄ༻
    ੑɼߴ଎ͳԠ౴ੑೳɼ௕ظؒͷӡ༻ͳͲଟذʹΘͨΔ
    ɾଟ༷ͳཁٻʹରͯ͠ଟ༷ͳ஌ࣝͱٕज़͕ඞཁͱͳΔ
    ɾOS΍σʔλϕʔεɼωοτϫʔΫͳͲͷ޿ൣғͷجૅ஌ࣝ
    ɾϛυϧ΢ΣΞ΍ࣗಈԽπʔϧΛར༻͢ΔͨΊͷԠ༻஌ࣝ
    ɾ஌ࣝΛ૊Έ߹Θͤ1ͭͷγεςϜΛߏங͠ɼӡ༻͢ΔͨΊͷٕज़
    എܠ

    View full-size slide

  5. 6
    1. ैདྷͷ৘ใ޻ֶͷڭՊॻ͸ɼ఻౷తʹ෼ྨ͞Εͨ෼໺ʹ͓͚Δجૅ
    ஌ࣝͷΈ
    ɾجૅ஌ࣝΛͲͷΑ͏ʹWebαʔϏε։ൃʹద༻͢Δͷ͔͸Θ͔Β
    ͳ͍
    2. WebαʔϏε։ൃͱӡ༻ͷݱ৔Ͱ͸ɼະܦݧͰ΋ཧղͰ͖ΔΑ͏ͳ
    ܗͰݱ৔ͷܦݧ͕ݴޠԽ͞Ε͍ͯͳ͍
    ໰୊ҙࣝ
    ৘ใ޻ֶͷجૅ஌ࣝͱɼWebγεςϜ΁ͷԠ༻஌ࣝΛ
    ૊Έ߹Θͤͨɼੜ͖ͨ஌ࣝͷ஍ਤΛͭ͘Δ͜ͱ͕ॏཁ

    View full-size slide

  6. 7
    ྨࣅͷ໰୊ҙࣝʹର͢ΔΞϓϩʔν
    ίʔυͱͯ͠ΠϯϑϥετϥΫνϟΛ؅ཧ
    ͢Δͱ͍͏ߟ͑ํ͸ɺैདྷͷΠϯϑϥετ
    ϥΫνϟ؅ཧͱ͸େ͖͘ҟͳΔɻ
    ࢲ͸ɺ͜ͷస׵ΛͲͷΑ͏ʹਐΊͨΒΑ͍
    ͔͕Θ͔Βͣۤ࿑͍ͯ͠ΔνʔϜΛͨ͘͞
    Μݟ͖ͯͨɻ
    ͔͠͠ɺ͜ΕΒͷπʔϧΛޮՌతʹ࢖͏ͨ
    ΊͷΞΠσΞɺύλʔϯɺϓϥΫςΟε
    ͸ɺΧϯϑΝϨϯεͷߨԋɺϒϩάϙε
    τɺݸผͷ࿦จʹࢄΒ͹͍ͬͯΔɻ

    View full-size slide

  7. 8
    طଘͷମܥͱͦͷ՝୊
    1. Ͳͷମܥ͕WebγεςϜΞʔΩςΫνϟʹඞཁ͔͕ࣗ໌Ͱͳ͍
    2. طଘͷମܥಉ࢜ͷؔ࿈ੑ͕ࣗ໌Ͱͳ͍
    ɾجૅ஌ࣝͱԠ༻஌ࣝΛ͋Θͤͨମܥ͸͍͔ͭ͘ଘࡏ͢Δ
    ɾWebγεςϜΞʔΩςΫνϟʹඞཁͳٕज़ཁૉΛ໢ཏ͢ΔͨΊʹɼෳ
    ਺ͷମܥΛ૊Έ߹ΘͤΔඞཁ͕͋Δ

    View full-size slide

  8. 9
    ݚڀ໨త
    ɾWebγεςϜΞʔΩςΫνϟͷॳֶऀ͕ɼܦݧʹΑΔؼೲతֶशʹ
    Ճ͑ͯɼମܥ͔Βͷԋ៷తֶश͕ՄೳͱͳΔ
    ɾWebγεςϜΞʔΩςΫνϟ෼໺Ͱ৽͍ٕ͠ज़Λݚڀ͢Δ৔߹ʹɼ
    ମܥ͔Βෳ਺ͷΞΠσΞͷ૊Έ߹ΘͤΛൃݟՄೳͱͳΔ

    View full-size slide

  9. 10
    1. ஍ਤͷத৺఺ΛͱΔ => ࠓճ͸yuukiͷத৺఺Ͱ͋ΔSREΛબ୒
    2. طଘͷମܥ(جૅ஌ࣝମܥͱԠ༻஌ࣝମܥ)Λ஍ਤʹඳ͘
    3. ஍ਤͷத৺఺͔Βͷؔ࿈ੑ͕ෆ໌Ͱ͋ͬͨΓۭനͷྖ஍Λݟ͚ͭͯ
    ͦΕΒΛ໌Β͔ʹ͢Δ
    ஍ਤΛͭ͘Δͱ͸Ͳ͏͍͏͜ͱ͔
    ɾγεςϜ෼໺͸༷ʑͳ෼໺ͷ஌ࣝΛ૊Έ߹ΘͤΔͨΊɺ ʓʓ෼໺͕
    ೖΔ͔ೖΒͳ͍͔ͱ͍ͬͨείʔϓΛઃఆ͢Δٞ࿦ʹͳΓ͕ͪ
    ɾείʔϓΛઃఆ͢Δͱ͍͏ΑΓ͸ɺطଘͷ஍ਤͱͭͳ͗߹Θͤͯɺ
    Ͳͷํ޲ʹͲΕ͚ͩา͘ͱԿʹͨͲΓண͔͕͘෼͔Ε͹Α͍

    View full-size slide

  10. 2.
    ؔ࿈ମܥ

    View full-size slide

  11. Betsy Beyer et al.ฤ, ۄ઒ཽ࢘ ༁, ᖒా෢உ,et al. ؂༁,
    "SRE αΠτϦϥΠΞϏϦςΟΤϯδχΞϦϯάʕʕ
    Googleͷ৴པੑΛࢧ͑ΔΤϯδχΞϦϯάνʔϜ”,
    ΦϥΠϦʔɾδϟύϯ,
    2017.

    View full-size slide

  12. 13
    SRE
    ɾ৴པੑ(Reliability)͕ͦ͋͜ΒΏΔϓϩμΫτͷجຊతͳػೳͰ͋Δ
    ͱߟ͑ɼ৴པੑΛ࣠ʹ͜Ε·Ͱͷӡ༻ٕज़Λ1ͭͷ෼໺ͱཱͯ֬͠
    ɾΤϥʔΛڐ༰͠ɼ৴པੑΛ੍ޚ͢Δ͜ͱͰมߋ଎౓Λ࠷େԽ͢Δ
    ɾମܥͱͯ͠ͷߩݙ͸ɼͦΕ·ͰͷWebγεςϜӡ༻ͷ͹Β͹Βͩͬ
    ͨཁૉٕज़͕৴པੑͷ੍ޚʹͭͳ͕Δ͜ͱΛࣔͨ͜͠ͱ

    View full-size slide

  13. 14
    ৴པੑͷఆٛͱܭଌ
    ɾ“γεςϜ͕ٻΊΒΕΔػೳΛɼఆΊΒΕͨ৚݅ͷԼͰɼఆΊΒΕͨ
    ظؒʹΘͨΓɼো֐Λى͜͢͜ͱͳ࣮͘ߦ͢Δ֬཰”[26]
    ɾ৴པੑΛఆྔతʹSLO(αʔϏεϨϕϧ໨ඪ)ͱͯ͠ઃఆ͢Δ
    ɾSLOྫ) ϦΫΤετͷԠ౴࣌ؒͷ95%ile͕300msҎԼͷঢ়ଶ͕࢛൒
    ظதͷ99.8%ͷظؒҡ࣋͞Ε͍ͯΔ͜ͱ
    ɾSLOΛա৒ୡ੒ͤͣʹϐολϦୡ੒͢Δ͜ͱΛ໨ࢦ͢
    [26] Patrick O'Connor, Andre Kleyner, Practical Reliability Engineering, Wiley, 2011.

    View full-size slide

  14. 15
    SREͷ੹೚ൣғ
    ɾϞχλϦϯά
    ɾΠϯγσϯτରԠ
    ɾมߋ؅ཧ
    ɾΩϟύγςΟϓϥϯχϯά
    ɾϓϩϏδϣχϯά
    ɾޮ཰ͱύϑΥʔϚϯε

    View full-size slide

  15. 16
    ৴པੑͷ֊૚
    ɾ৴པੑͷ֊૚͸ɼ৴པੑΛ੍ޚ͢ΔͨΊͷج൫
    ɾϞχλϦϯά͕ͳ͚Ε͹ɼ৴པੑͷܭଌ͕ͦ΋ͦ
    ΋Ͱ͖ͳ͍
    [1] Betsy Beyer et. al.ฤ, "SRE αΠτϦϥΠΞϏϦςΟΤϯδχΞϦϯά", ΦϥΠϦʔδϟύϯ,

    2017. ਤIII -1αʔϏεͷ৴པੑͷ֊૚
    ɾΠϯγσϯτରԠମ੍͕ͳ͚Ε͹ɼ৴པੑ
    ͕ଛͳΘΕͯ΋ճ෮Ͱ͖ͳ͍
    ɾϙετϞʔςϜ͕ͳ͚Ε͹ಉ͡Πϯγσϯ
    τΛ܁Γฦ͠ɼ৴པੑ͕ଛͳΘΕ΍͘͢ͳ
    Δ
    ɾ…

    View full-size slide

  16. Brendan Gregg ஶ, ੢࿬༃ߛ ؂༁, ௕ඌߴ߂ ༁,
    “ৄղ γεςϜɾύϑΥʔϚϯε”,
    ΦϥΠϦʔɾδϟύϯ,
    2017.

    View full-size slide

  17. 18
    ৄղγεςϜɾύϑΥʔϚϯε
    ɾର৅ͱͳΔγεςϜ͸ɼWebγεςϜͷ৔߹͸෼ࢄγεςϜ
    ɾWebγεςϜʹ͓͚Δ෼ࢄγεςϜ͸ɼҰൠʹ୯Ұϗετ্ͷϓϩ
    ηεΛجຊཁૉͱͯ͠ߏ੒͞ΕΔ
    ɾ୯Ұϗετ্ͷߏ੒Λཧղ͢Δʹ͸ɼOSͷݪཧͱOS্Ͱಈ࡞͢Δ
    ΞϓϦέʔγϣϯͷγεςϜϞσϧΛཧղ͢Δඞཁ͕͋Δ
    ɾॻ੶ʮৄղγεςϜɾύϑΥʔϚϯεʯͰ͸ɼOS͓ΑͼOSͷίϯ
    ςΩετʹ͓͚ΔΞϓϦέʔγϣϯͷੑೳϞσϧ͕ମܥԽ͞Ε͍ͯ
    Δ

    View full-size slide

  18. 19
    ৄղγεςϜɾύϑΥʔϚϯε

    View full-size slide

  19. Martin Kleppmannஶ, ੪౻ଠ࿠ ؂༁, ۄ઒ཽ࢘ ༁,
    “σʔλࢦ޲ΞϓϦέʔγϣϯσβΠϯ
    ――৴པੑɺ֦ுੑɺอकੑͷߴ͍෼ࢄγεςϜઃܭͷݪཧ”,
    ΦϥΠϦʔɾδϟύϯ,
    2019.

    View full-size slide

  20. 21
    σʔλࢦ޲ΞϓϦέʔγϣϯσβΠϯ
    ɾιʔγϟϧωοτϫʔΫ΍IoTΞϓϦέʔγϣϯͰ͸ɼଟ਺ͷར༻ऀ
    ΍σόΠε͕ੜ੒͢ΔେྔͷσʔλΛѻ͏
    ɾ෼ࢄγεςϜʹ͓͚Δॏཁͳ 3 ͭͷ՝୊ʹয఺
    ɾ৴པੑɼεέʔϥϏϦςΟɼϝϯςφϯεੑ
    ɾσʔλࢦ޲ͷ෼ࢄγεςϜΛɺετϨʔδΤϯδϯɺσʔλΛ෼ࢄ
    ͢Δͱ͖ͷ഑ஔख๏ɺ෼ࢄͨ͠σʔλͷҰ؏ੑͷ୲อख๏ͳͲͷ؍
    ఺ͰମܥԽ͍ͯ͠Δ

    View full-size slide

  21. Kief Morris ஶ, ٶԼ߶ี ؂༁ɺ௕ඌߴ߂ ༁,
    “Infrastructure as Code
    ――Ϋϥ΢υʹ͓͚Δαʔό؅ཧͷݪଇͱϓϥΫςΟε”,
    ΦϥΠϦʔɾδϟύϯ
    2017.

    View full-size slide

  22. 23
    Infrastructure As Codeπʔϧͷ෼ྨ
    Dynamic
    Infrastructure
    Platform
    Dynamic
    Infrastructure
    Platform
    Dynamic
    Infrastructure
    Platform
    Infrastructure Definition Tool
    Server Configuration Tool
    Infrastructure Service
    ɾInfrastructure As Code͸ɺιϑτ΢ΣΞ։ൃͷ࣮ફ஌ΛITΠϯϑϥ
    ετϥΫνϟͷࣗಈԽʹ׆͔͢Ξϓϩʔν
    αʔόͳͲͷجຊϦιʔεͷ؅ཧ
    IaaSͳͲ
    Ϧιʔεͷઃఆ؅ཧ
    TerraformͳͲ
    αʔόͷࡉ෦ͷઃఆ؅ཧ
    ChefɼAnsibleͳͲ
    ؅ཧࢧԉπʔϧ΍αʔϏε
    ϞχλϦϯάɼσϓϩΠͳͲ

    View full-size slide

  23. 24
    ؔ࿈ମܥͷ՝୊
    ɾ͜ΕΒͷମܥΛ͢΂ͯ͋ΘͤΔͱɼ͍ͣΕ΋WebγεςϜΛߏ੒͢
    ΔͨΊʹඞཁͳ஌ࣝͷଟ͘Λ໢ཏͰ͖Δ
    ɾ͔͠͠ɼ͜ͷମܥΛ૊Έ߹ΘͤΔख๏ʹ͸ɼ࣍ͷ2ͭͷ՝୊͕͋Δ
    ɾͲͷମܥ͕ඞཁ͔Λֶशऀ͸ࣗྗͰൃݟ͢Δඞཁ͕͋Δ
    ɾ֤ମܥ͸ಠཱͯ͠ߏ੒͞Ε͍ͯΔͨΊɼମܥಉ࢜ͷؔ࿈ੑΛֶशऀ
    ͕ࣗྗͰݟग़͢ඞཁ͕͋Δ
    ɾମܥͷҰ෦͕ଞͷମܥͷҰ෦ͱॏෳ͢Δ͜ͱ͕͋Δ
    ɾInfrastructure ServiceͷϞχλϦϯάͱSREͷϞχλϦϯάͳͲ

    View full-size slide

  24. 3.
    ఏҊମܥ

    View full-size slide

  25. 26
    1. ৄղγεςϜύϑΥʔϚϯε => ୯Ұϗετ্ͷମܥ
    2. σʔλࢦ޲ΞϓϦέʔγϣϯσβΠϯ => ෼ࢄγεςϜͷମܥ
    3. Infrastructure As Code => ΞϓϦέʔγϣϯ࣮ߦ؀ڥͷମܥ
    4. SRE => ৴པੑ੍ޚͷମܥ
    SREΛ࣠ʹطଘମܥΛ·ͱΊΔ
    SRE͸ɼ৴པੑΛ੍ޚ͠ɼมߋ଎౓Λ࠷େԽ͢Δͱ͍͏໨తΛ
    ༩͑ͯ͘ΕΔ

    View full-size slide

  26. 27
    1. ΞϓϦέʔγϣϯͷ࣮ߦ؀ڥͷߏ੒ख๏
    2. ୯Ұϗετ্ͷΞϓϦέʔγϣϯͷߏ੒ख๏
    3. ෼ࢄγεςϜͱͯ͠ͷΞϓϦέʔγϣϯͷߏ੒ख๏
    4. ߏ੒͞ΕͨΞϓϦέʔγϣϯͷ৴པੑ੍ޚ
    ఏҊ͢Δମܥͷେ߲໨
    ৴པੑΛ੍ޚ͠ɼมߋ଎౓Λ࠷େԽ͢Δ͜ͱΛ໨తͱͯ͠ɼ
    γεςϜͷߏ੒ख๏Λ࣍ͷ1~4ʹ෼ྨ͢Δ

    View full-size slide

  27. 28
    ෼ྨಉ࢜ͷؔ܎ੑ
    ৴པੑ੍ޚ
    ࣮ߦ؀ڥͷߏ੒
    ୯Ұϗετ্ͷ
    ΞϓϦέʔγϣϯߏ੒
    ෼ࢄγεςϜ
    ΞϓϦέʔγϣϯߏ੒
    αʔόɼωοτϫʔΫ؀ڥΛ
    ͍͔ʹߏ੒͢Δ͔
    ߴ଎࡞੒ɾมߋ
    εέʔϥϏϦςΟ
    OS্ͷΞϓϦέʔγϣϯ
    ʹ͍͔ʹޮ཰తʹ
    ϦιʔεΛར༻ͤ͞Δ͔
    ϞχλϦϯά
    ࣮ߦޮ཰
    ϞχλϦϯά
    εέʔϥϏϦςΟ
    ߴՄ༻ੑ
    ෼ࢄϗετ্Ͱ͍͔ʹ
    ΞϓϦέʔγϣϯΛ
    ߏ੒͢Δ͔

    View full-size slide

  28. 29
    ৴པੑ੍ޚ
    ࣮ߦ؀ڥͷߏ੒
    ୯Ұϗετ্ͷ
    ΞϓϦέʔγϣϯߏ੒
    ෼ࢄγεςϜ
    ΞϓϦέʔγϣϯߏ੒
    WSAݚ#5ͷ֤ݚڀΛద༻
    matsumotory
    “ίϯςφ࣮ߦج൫"
    hirolovesbeer
    “؂ࢹγεςϜ”
    k1Low
    “ҟৗՕॴಛఆख๏”
    monochromegane
    “Kaburaya”
    osako_ricc
    “ॲཧܥੑೳධՁ”
    zacky1972 “Pelemay”

    View full-size slide

  29. 30
    ૊৫จԽͱͷؔ࿈ੑ
    ৴པੑ੍ޚ
    ࣮ߦ؀ڥͷߏ੒
    ୯Ұϗετ্ͷ
    ΞϓϦέʔγϣϯߏ੒
    ෼ࢄγεςϜ
    ΞϓϦέʔγϣϯߏ੒
    DevOps
    ίϥϘϨʔγϣϯ
    ΞϑΟχςΟ
    πʔϧ
    εέʔϦϯά
    ΠϯγσϯτରԠ
    ϙετϞʔςϜ
    ϚΠΫϩαʔϏε

    View full-size slide

  30. 32
    ·ͱΊ
    ɾWebγεςϜΞʔΩςΫνϟʹ͍ͭͯɼମܥ͔Βͷԋ៷తֶशͱΞΠ
    σΞͷ૊Έ߹ΘͤͷଅਐΛ໨తͱ͢Δ
    ɾఏҊମܥ͸ɼ৴པੑΛ੍ޚ͠ɼมߋ଎౓Λ࠷େԽ͢Δ͜ͱΛ໨తͱ͠
    ͯɼ4ͭͷ෼ྨΛఏҊ͍ͯ͠Δ

    View full-size slide

  31. 33
    ࠓޙͷ՝୊
    ɾఏҊ͢ΔମܥΛར༻ͨ͠ͱ͖ʹɼֶशՄೳͳൣғΛ໌Β͔ʹ͢Δ
    ɾ։ൃ͢ΔγεςϜ͕ߴ౓Խ͢Ε͹͢Δ΄Ͳɼඞཁͳ஌ࣝ͸޿͘·ͨ
    ͸ਂ͘ͳΓɼ୯ҰͷମܥͰΧόʔ͢Δ͜ͱ͸೉͘͠ͳΔ
    ɾWebγεςϜΞʔΩςΫνϟͷ෼໺ͷڥքΛ໌Β͔ʹ͢Δ
    ɾྫ͑͹ɼσʔλϕʔεͷεΩʔϚઃܭ͸ɼ࣮ߦޮ཰ੑͱϏδωεϩ
    δοΫͷઃܭͷ྆ऀʹؔΘΔ
    ɾϑϩϯτΤϯυ૚ͱόοΫΤϯυ૚ͷ۠ผͱؔ࿈ੑΛ໌Β͔ʹ͢Δ
    ɾΧϧνϟʔ΍૊৫ମܥͱͷؔ࿈ੑΛ໌Β͔ʹ͢Δ

    View full-size slide