エンジニアリングをちゃんとやる あるいは 人類の平和 について / wsa02-rrreeeyyy

エンジニアリングをちゃんとやる あるいは 人類の平和 について / wsa02-rrreeeyyy

第 2 回 Web System Architecture 研究会で(なぜか)招待講演をさせていただいたときの資料です

28e154e6e0351c70091997d2f574295a?s=128

rrreeeyyy

May 12, 2018
Tweet

Transcript

  1. "ΤϯδχΞϦϯάΛͪΌΜͱ΍Δ" ͋Δ͍͸ "ਓྨͷฏ࿨" ʹ͍ͭͯ ΫοΫύουגࣜձࣾ ΠϯϑϥετϥΫνϟʔ෦ SRE άϧʔϓ ٢઒ ཽଠ

    ( @rrreeeyyy ) ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 1
  2. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 2
  3. !SSSFFFZZZ !SSSFFFZZZ IUUQTSSSFFFZZZDPN :PTIJLBXB3ZPUB Me • Yoshikawa Ryota ( @rrreeeyyy

    [reɪ] ) • גࣜձࣾϋʔτϏʔπ (2010/11 ʙ 2016/12) • MSP ࣄۀ෦ ӡ༻{ελοϑ,ΤϯδχΞ} • ΫοΫύουגࣜձࣾ (2017/01 ʙ) • ΠϯϑϥετϥΫνϟʔ෦ SRE άϧʔϓ • ڵຯྖҬ • ϞχλϦϯάɾ࣌ܥྻσʔλϕʔε • ෼ࢄγεςϜɾϩʔυόϥϯα • ࣍ճ͸ී௨ͷൃද࿮ͰࢀՃ͢Δͧ!! ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 3
  4. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 4
  5. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 5
  6. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 6
  7. [࠶ܝ] Site Reliability Engineering ͱ͸ • αΠτͷ৴པੑͷશͯʹ੹೚ൣғΛ࣋ͭɺͱ͢ΔΤϯδχΞϦϯάख๏ • ಛʹɺιϑτ΢ΣΞɾγεςϜΤϯδχΞϦϯάΛ༻͍ͯ՝୊Λղܾ͢Δ •

    ྫ͑͹ɺύϑΥʔϚϯε • ύϑΥʔϚϯεʹ໰୊͕͋Δίʔυ͸ SRE ࣗ਎͕ίʔυΛॻ͍ͯमਖ਼͢Δ • ྫ͑͹ɺεέʔϥϏϦςΟɾΞϕΠϥϏϦςΟ • ਓؒʹΑΔखಈͷ࡞ۀΛίʔυʹΑΓࣗಈԽ͢Δ • ن໛΍ΞΫηε͕૿େͯ͠΋҆ఆͯ͠αʔϏεΛఏڙͰ͖Δঢ়ଶʹ͢Δ • ΠϯϑϥΤϯδχΞͷ੹೚ൣғ͕૿େͨ͠தͰ͋Δछɺ৬੹Λ࠶ఆٛͨ͠෺ͱଊ͍͑ͯΔ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 7
  8. [࠶ܝ] ӡ༻ͷݱ৔͔Βݟͨݚڀɾ࿦จͷੈք • ΤϯδχΞϦϯάΛͪΌΜͱ΍Δࣄ͕ݱ৔ϨϕϧͰ΋ධՁ͞ΕΔΑ͏ʹ • ͜ͷจ຺ͷҰͭͱͯ͠ SRE ͷΑ͏ͳख๏ɾ৬छ͕ग़͖ͯͨͱ͍͏ཧղ • ࿦จΛॻ͍ͨΓಡΜͰཧղɾ࣮૷͢Δࣄ͕ධՁ͞ΕΔΑ͏ʹͳ͖ͬͯͨ

    • ࣮ࡍͷӡ༻ͷݱ৔Ͱ΋ಡΜͰཧղ͢Δࣄ͸ඞཁʹͳ͖ͬͯͨ • ٕज़બఆͷࢦඪͷҰͭͱͯ͠΍ϛυϧ΢ΣΞͷڍಈͷཧղͳͲ • ͍ΘΏΔݚڀ։ൃͷΑ͏ͳ෦໳Ͱͳͯ͘΋೔ৗతʹߦ͏Α͏ʹ • ଟ͘ͷٕज़اۀͰӡ༻ɾϛυϧ΢ΣΞ౳ͷ࿦จ͕ଟ͘ग़ͯ͘ΔΑ͏ʹ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 8
  9. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 9
  10. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 10
  11. ࿦จΛެ։͢Δ͜ͱͰ༏Ґੑ͕ൃੜ͢ΔΑ͏ʹ • Google, Amazon, Facebook, Ne3lix... • ଞʹ΋େখؔΘΒ༷ͣʑͳاۀ͔Β࿦จ͕ग़͍ͯΔ • USENIX

    ͷΧϯϑΝϨϯε౳Ͱٕज़اۀ͕ੵۃతʹൃද • FAST, OSDI, NSDI, LISA, Security ... • Ϋϥ΢υαʔϏεͷ಺෦࣮૷΍಺੡ͷϛυϧ΢ΣΞʹؔΘΒͣ࿦จ͕ग़Δ • 1 ΤϯδχΞͰ΋࿦จΛಡΉ͜ͱͰΫϥ΢υαʔϏεɾϛυϧ΢ΣΞͷબఆΛߦ͏ • ݚڀΛ࣮ӡ༻Ͱ࢖͑ΔΑ͏ʹ࣮૷͢Δ͜ͱͰ੒ޭͨ͠ Hashicorp ͷΑ͏ͳྫ΋͋Δ • ࿦จΛ௨ٕͯ͡ज़ΛΦʔϓϯʹ͢Δࣄ͕اۀɾίϛϡχςΟͷ༏Ґੑʹ΋ܨ͕Δ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 11
  12. Φʔϓϯͳϓϩηεͷݚڀɾ࿦จ͕ੈքΛม͑Δ • ػցֶशͳͲͷจ຺Ͱ΋ arXiv ౳Ͱͷ࿦จϕʔεͷ৘ใަ׵͕੝Μ • ͍͢͝੎͍Ͱٕज़͕ਐา͍ͯ͘͠ͷΛ໨ͷ౰ͨΓʹग़དྷΔ • ͍ΘΏΔԾ૝௨՟ϒʔϜͷى͜Γ΋ͨͬͨ 9

    ϖʔδͷ࿦จ͔Β • h*ps:/ /bitcoin.org/bitcoin.pdf • ϙΞϯΧϨ༧૝ɾABC ༧૝ͷΑ͏ͳ਺ֶͷະղܾ໰୊΋ 1 ͭͷΦʔϓϯͳ࿦จ͔Βղܾ • h*ps:/ /arxiv.org/abs/math/0211159 • h*p:/ /www.kurims.kyoto-u.ac.jp/~moHzuki/Inter-universal%20Teichmuller%20Theory%20I.pdf • ʰՀཟͱόβʔϧʱͷݚڀɾ࿦จ൛͕ى͖ͭͭ͋ΔͷͰ͸ͳ͍͔ʁ • "Given enough eyeballs, all bugs are shallow" ͸ݚڀɾ࿦จͷੈքͰ΋ద༻ՄೳͳͷͰ͸ͳ͍͔ʁ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 12
  13. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 13
  14. վΊͯ: Web ΤϯδχΞͷੈքʹى͖ͭͭ͋Δ͜ͱ • ݚڀɾ࿦จ͕ΦʔϓϯʹͳΓݱ৔ϨϕϧͰ΋औΓೖΕΒΕ͸͡Ίͨ • اۀ΍ίϛϡχςΟʹͱͬͯ͸ެ։͢Δ͜ͱͷ༏Ґੑ΋͋ΔͨΊ • Ұݸਓͱͯ͠͸ެ։ɾऔಘ͕༰қͱͳΓશମͱͯ͠ͷϨϕϧ͕޲্ͨ͠ •

    ݚڀɾ࿦จ͕લఏͱͳΓΞʔΩςΫνϟ͕ਐา͍ͯ͘͠Α͏ʹͳ͖ͬͯͨ • ෳࡶͱ͞Ε͍ͯͨ໰୊͕ԿΒ͔ͷݚڀख๏Ͱ͋Δఔ౓ղܾՄೳʹͳΔ • ϛυϧ΢ΣΞ΍Ϋϥ΢υαʔϏε΋ɺ༷ʑͳݚڀɾ࿦จΛݟͯબ΂Δ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 14
  15. վΊͯ: Web ΤϯδχΞͷੈքʹى͖ͭͭ͋Δ͜ͱ • ཪΛฦͤ͹؆୯ͳ࢓ࣄ͸ͲΜͲΜՁ஋͕ബΕͯ͘ΔΑ͏ʹͳͬͨ • ϛυϧ΢ΣΞͷઃఆΛͯ͠ɺͨͩಈ͔ͤΔ͚ͩͰ͸μϝͳ࣌୅ʹͳͬͨ • Ͳ͏͍ͬͨઃఆͳͷ͔ʁ͜ͷઃఆʹ͢Δͱͳͥྑ͍ͷ͔ʁ •

    ਖ਼͍͠࿦ཧɾίʔυϨϕϧͰਖ਼֬ʹཧղ͍ͯ͠Δ͜ͱʹҙຯ͕͋Δ • ෳࡶԽ͢ΔதͰɺυϝΠϯ͸ߋʹࡉ͔͘ࡉ෼Խ͞ΕΔΑ͏ʹͳͬͨ • ͋Δఔ౓·Ͱ͸ڊਓͷݞʹ৐ΕΔ͕ɺ࠷దԽͷͨΊʹ͸࡞ΓࠐΈ͕ඞཁ • Ͳͷ "ڊਓ" ʹ৐Δͷ͔ʁ"ڊਓ" ΛͲ͏࢖͍͜ͳ͔͢ʁͱ͍͏ٕྔ΋ඞཁ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 15
  16. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 16
  17. "ΤϯδχΞϦϯάΛͪΌΜͱ΍Δ" • "ͪΌΜͱ΍Δ" ͸༷ʑ͋Δ͕...ྫ͑͹ "ͪΌΜͱͯ͠Δͳ͋" ͱ͍͏ಉ྅͸࣍ͷ͜ͱ͕Ͱ͖͍ͯΔ • ૊৫΍ϛυϧ΢ΣΞͷഎܠΛਖ਼͘͠೺ѲͰ͖Δ • ૊৫΍ϛυϧ΢ΣΞͷ໰୊఺ΛࣗΒൃݟͰ͖Δ

    • ૊৫΍ϛυϧ΢ΣΞͷ໰୊఺Λղܾ͢Δख๏ΛఏҊͰ͖Δ • ఏҊͨ͠ख๏ΛࣗΒ࣮ફɾ࣮૷ͨ͠ΓͰ͖Δ • ఏҊͨ͠ख๏Λ࣮ફɾ࣮૷ͨ݁͠ՌΛଞख๏ͷ݁Ռͱൺֱ͠ߟ࡯Ͱ͖Δ • ্هͷ߲໨Λ࿦ཧతͰޡΓͷগͳ͍จষʹ·ͱΊΔ͜ͱ͕Ͱ͖Δ • ·ͱΊͨจষɾ࣮૷ͷ݁ՌΛެ։͠Φʔϓϯͳ৔Ͱٞ࿦͠վળͰ͖Δ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 17
  18. "ΤϯδχΞϦϯάΛͪΌΜͱ΍Δ" • ݚڀɾ࿦จͷख๏ʹͱͯ΋͍ۙ • ࣮ࡍͷۀ຿ͱݚڀɾ࿦จͷڥք͸ݱ৔ϨϕϧͰ΋ᐆດʹͳ͖ͬͯͨ • ࣮ࡍʹձࣾͰ͸Կ͔େ͖ͳ͜ͱΛ΍Δͱ͖͸ Design Doc Λॻ͍͍ͯΔ

    • খ͞ͳ͜ͱΛ΍Δͱ͖΋ GitHub ͷ Issue ΍ PR Ͱٞ࿦ɾ࣮૷Λߦ͏ • Ͳ͜·ͰຊؾͰߟ͑ൈ͍ͯɺٞ࿦ͯ͠ɺखΛಈ͔ͤΔ͔ɺͱ͍͏ͱ͜Ζ͕伴ʹͳΓͦ͏ • "ΤϯδχΞϦϯάΛͪΌΜͱ΍Δ" ͕Ͱ͖ΔͱׂͱͲͷ෼໺Ͱ΋௨༻͢Δ • ͦͷͳ͔Ͱ༷ʑͳ෼໺ͷ஌ࣝΛऔΓೖΕͭͭઐ໳෼໺ΛਂԽͤ͞ΒΕΔ • WSA ݚͷΑ͏ͳ "ͪΌΜͱ΍Δ" Φʔϓϯͳ৔͕͋Δ͜ͱ͸ૉ੖Β͍͠ͱࢥ͏ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 18
  19. ͪΌΜͱ΍Δɺͷ࿈࠯Λͭ͘Δ • ͩΕ͔͕Φʔϓϯͳ৔Ͱ "ͪΌΜͱ΍Δ" ͜ͱͰ ... • ٞ࿦ʹࢀՃͨ͠ਓ΋ "ͪΌΜͱ΍Δ" ...

    • ͦͷਓ͕·ͨ "ͪΌΜͱ΍Δ" ... • ΈΜͳͪΌΜͱͰ͖Δʂ • ੈքϨϕϧͰٕज़ͷਐา͕ૣ͘ͳΔͷͰ͸ɺͱߟ͍͑ͯΔ • ͔ͤͬ͘ΤϯδχΞͳΜ͔ͩΒٕज़ͰੈքΛม͍͑ͨ • ٕज़͕ਐา͢Ε͹ੈք͸ฏ࿨ʹͳΔʂ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 19
  20. ! ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) |

    Yoshikawa Ryota ( @rrreeeyyy ) 20
  21. One more things... ୈ 2 ճ Web System Architecture ݚڀձ

    (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 21
  22. ͳͥ΍Δͷ͔ ΋ຊؾͰߟ͑ͯΈΔ • ;ͱཱͪࢭ·ͬͯ ͳͥ͜ΕΛ΍Δͷ͔ ΋ਂ͘ߟ͑௚ͯ͠ΈΔ • ͳٕͥज़ΛֶͿͷʁͳͥݚڀΛ͢Δͷʁ • ୯ʹ໘ന͍͔Βʁ࢓ࣄ͔ͩΒʁ৯΂͍ͯͨ͘Ί͚ͩʁ

    • ͜ͷٕज़ɾݚڀɾΞʔΩςΫνϟ͕࣮ݱͨ͠ઌʹͳʹ͕͋ΔͷͩΖ͏͔ʁ • ࣮ݱͨ͠ੈքͰɺࣗ෼͸Ͳ͏ͳ͍͍ͬͯͨͷͩΖ͏͔ʁ • ࣮ݱͨ͠ੈքͰɺΈΜͳ͸Ͳ͏ͳ͍ͬͯΔͷͩΖ͏͔ʁ • "ͪΌΜͱ΍Δ" ͷ͸೉͍͕͠ɺ࠳ંͦ͠͏ʹͳͬͨͱ͖ࣗ෼ʹྗΛ༩͑ͯ͘ΕΔ • ΈΜͳ͕ਖ਼ࣗ͘͠෼ͷ৴೦Λٕ࣋ͬͯज़Λਐาͤ͞Δ͜ͱ͕ਓྨͷฏ࿨ͳͷͰ͸ʁ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 22
  23. ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa

    Ryota ( @rrreeeyyy ) 23
  24. "ͪΌΜͱ΍Δ" + "ͳͥ΍Δͷ͔" = ୈ 2 ճ Web System Architecture

    ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 24
  25. ·ͱΊ • Ұݸਓͷݱ৔Ϩϕϧ͔Βݟͨ࠷ۙͷۀքͷྲྀΕʹ͍ͭͯ • ݚڀ΍࿦จΛϕʔεʹͨ͠ख๏΍ٞ࿦͕૿͖͍͑ͯͯΔ • Ұਓͷॻ͍ͨ࿦จ͕Φʔϓϯͳ৔ʹग़ͯੈքΛม͑Δ͜ͱ΋ • Web ΤϯδχΞʹى͖ͭͭ͋Δ͜ͱʹ͍ͭͯ؆୯ʹߟ࡯

    • ؆୯ͳ࢓ࣄɾ಄Λ࢖Θͳ͍࢓ࣄ͸Ձ஋͕ࣦΘΕ͍ͯ͘ • "ͪΌΜͱ΍Δ" ͜ͱ͕ඇৗʹେࣄʹͳ͍ͬͯ͘ͱ༧૝ • "ͪΌΜͱ΍Δ" ͨΊʹ "ͳͥ΍Δͷ͔" ͷ࣠Λ࣋ͭ͜ͱͰਓྨ͕ฏ࿨ʹͳΔ͔΋ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 25