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

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

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

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

rrreeeyyy

May 12, 2018
Tweet

More Decks by rrreeeyyy

Other Decks in Technology

Transcript

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

    ( @rrreeeyyy ) ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 1
  2. !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
  3. [࠶ܝ] Site Reliability Engineering ͱ͸ • αΠτͷ৴པੑͷશͯʹ੹೚ൣғΛ࣋ͭɺͱ͢ΔΤϯδχΞϦϯάख๏ • ಛʹɺιϑτ΢ΣΞɾγεςϜΤϯδχΞϦϯάΛ༻͍ͯ՝୊Λղܾ͢Δ •

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

    • ࣮ࡍͷӡ༻ͷݱ৔Ͱ΋ಡΜͰཧղ͢Δࣄ͸ඞཁʹͳ͖ͬͯͨ • ٕज़બఆͷࢦඪͷҰͭͱͯ͠΍ϛυϧ΢ΣΞͷڍಈͷཧղͳͲ • ͍ΘΏΔݚڀ։ൃͷΑ͏ͳ෦໳Ͱͳͯ͘΋೔ৗతʹߦ͏Α͏ʹ • ଟ͘ͷٕज़اۀͰӡ༻ɾϛυϧ΢ΣΞ౳ͷ࿦จ͕ଟ͘ग़ͯ͘ΔΑ͏ʹ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 8
  5. ࿦จΛެ։͢Δ͜ͱͰ༏Ґੑ͕ൃੜ͢ΔΑ͏ʹ • Google, Amazon, Facebook, Ne3lix... • ଞʹ΋େখؔΘΒ༷ͣʑͳاۀ͔Β࿦จ͕ग़͍ͯΔ • USENIX

    ͷΧϯϑΝϨϯε౳Ͱٕज़اۀ͕ੵۃతʹൃද • FAST, OSDI, NSDI, LISA, Security ... • Ϋϥ΢υαʔϏεͷ಺෦࣮૷΍಺੡ͷϛυϧ΢ΣΞʹؔΘΒͣ࿦จ͕ग़Δ • 1 ΤϯδχΞͰ΋࿦จΛಡΉ͜ͱͰΫϥ΢υαʔϏεɾϛυϧ΢ΣΞͷબఆΛߦ͏ • ݚڀΛ࣮ӡ༻Ͱ࢖͑ΔΑ͏ʹ࣮૷͢Δ͜ͱͰ੒ޭͨ͠ Hashicorp ͷΑ͏ͳྫ΋͋Δ • ࿦จΛ௨ٕͯ͡ज़ΛΦʔϓϯʹ͢Δࣄ͕اۀɾίϛϡχςΟͷ༏Ґੑʹ΋ܨ͕Δ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 11
  6. Φʔϓϯͳϓϩηεͷݚڀɾ࿦จ͕ੈքΛม͑Δ • ػցֶशͳͲͷจ຺Ͱ΋ 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
  7. վΊͯ: Web ΤϯδχΞͷੈքʹى͖ͭͭ͋Δ͜ͱ • ݚڀɾ࿦จ͕ΦʔϓϯʹͳΓݱ৔ϨϕϧͰ΋औΓೖΕΒΕ͸͡Ίͨ • اۀ΍ίϛϡχςΟʹͱͬͯ͸ެ։͢Δ͜ͱͷ༏Ґੑ΋͋ΔͨΊ • Ұݸਓͱͯ͠͸ެ։ɾऔಘ͕༰қͱͳΓશମͱͯ͠ͷϨϕϧ͕޲্ͨ͠ •

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

    ਖ਼͍͠࿦ཧɾίʔυϨϕϧͰਖ਼֬ʹཧղ͍ͯ͠Δ͜ͱʹҙຯ͕͋Δ • ෳࡶԽ͢ΔதͰɺυϝΠϯ͸ߋʹࡉ͔͘ࡉ෼Խ͞ΕΔΑ͏ʹͳͬͨ • ͋Δఔ౓·Ͱ͸ڊਓͷݞʹ৐ΕΔ͕ɺ࠷దԽͷͨΊʹ͸࡞ΓࠐΈ͕ඞཁ • Ͳͷ "ڊਓ" ʹ৐Δͷ͔ʁ"ڊਓ" ΛͲ͏࢖͍͜ͳ͔͢ʁͱ͍͏ٕྔ΋ඞཁ ୈ 2 ճ Web System Architecture ݚڀձ (2018/05/12) | Yoshikawa Ryota ( @rrreeeyyy ) 15
  9. "ΤϯδχΞϦϯάΛͪΌΜͱ΍Δ" • "ͪΌΜͱ΍Δ" ͸༷ʑ͋Δ͕...ྫ͑͹ "ͪΌΜͱͯ͠Δͳ͋" ͱ͍͏ಉ྅͸࣍ͷ͜ͱ͕Ͱ͖͍ͯΔ • ૊৫΍ϛυϧ΢ΣΞͷഎܠΛਖ਼͘͠೺ѲͰ͖Δ • ૊৫΍ϛυϧ΢ΣΞͷ໰୊఺ΛࣗΒൃݟͰ͖Δ

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

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

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

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

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

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

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