AWS Fargateで得する人損する人

E3d96b25e645921d9e5acbaa36c507a5?s=47 Masato Oshima
December 12, 2017

AWS Fargateで得する人損する人

E3d96b25e645921d9e5acbaa36c507a5?s=128

Masato Oshima

December 12, 2017
Tweet

Transcript

  1. AWS FargateͰ ಘ͢Δਓଛ͢Δਓ JAWS-UG ίϯςφࢧ෦ #10

  2. SF*OWFOU ࢀՃ ͖ͯ͠·ͨ͠ େຬ଍ʂʂ &,4ͷൃදͷॠؒˠ

  3. Masato Oshima github.com/mpon @_mpon iOS,Scala,Infra Engineer ίϯςφ·ΘΓͷ ͓༑ୡ͕ཉͯ͘͠΍ͬ ͖ͯ·ͨ͠

  4. ։ൃࢧԉ(ͱ͍͏ͱ͜ΖͰಇ͍͍ͯ·͢ ։ൃࢧԉ( ɾɾɾ w ֤αʔϏεͷΠϯϑϥߏஙɺӡ༻ w ۀ຿վળɺࣗಈԽਪਐ w "84্ʹΠϯϑϥߏங

  5. w ୊ࡐͷελσΟαϓϦ&/(-*4)ʹ͍ͭͯ w ϚΠΫϩαʔϏεԽͷഎܠ w &$Ϋϥελʔͷ৔߹ͷ໰୊఺ w 'BSHBUFͱ&$Ϋϥελʔͷඅ༻ൺֱ w 'BSHBUFͷϝϦοτ

    w 'BSHBUFʹͨ͠ͱ͖ͷ՝୊ w ੕ʹئ͍Λ "HFOEB
  6. ελσΟαϓϦ&/(-*4) ɾΦϯϥΠϯӳޠֶशαʔϏε ɾӳձ࿩Ի੠΍ը૾ɾಈըͳͲΛ഑৴ ɾΫΠζܗࣜͰֶशσʔλɺཤྺΛอଘ ɾJ04ɺ"OESPJEɺ8FCͰར༻Մೳ

  7. ೔ৗӳձ࿩ίʔε ϦϦʔε౰ॳ

  8. ೔ৗӳձ࿩ίʔε ࠷ॳ͸ݸ͙Β͍ͷαʔϏε ͩͬͨ ϦϦʔε౰ॳ

  9. ೔ৗӳձ࿩ίʔε αʔϏε͕ॱௐʹ৳ͼͯདྷͯ ৽͍͠ίʔεΛ૿΍͢͜ͱʹ %#͕ωοΫʹͳͬͯ͘Δ ϦϦʔε౰ॳ

  10. ϚΠΫϩαʔϏεԽ

  11. https://www.slideshare.net/danveloper/microservices-the-right-way ৺ʹਂ͍ইΛෛͬͨํͷ࡞඼

  12. ελσΟαϓϦ&/(-*4)ͷαʔϏεؒͷίϯϙʔωϯτਤ ཁૉ͕ଟ͍ͷͰུ֓Ͱઆ໌͠·͢

  13. ೔ৗӳձ࿩ίʔε 50&*$ίʔε ςΩετൢച ϦϦʔε͔Β೥

  14. ೔ৗӳձ࿩ίʔε 50&*$ίʔε ςΩετൢച ͍ͬͺ͍૿͑ͨ ಺෦௨৴͸H31$Ͱߦ͏ %#Λ෼ׂ ϦϦʔε͔Β೥

  15. ϦϦʔε౰ॳ ࠓ Ϋϥελʔ਺   ίϯςφΠϯελϯε਺ े਺୆ ਺ഒ ΠϯελϯελΠϓ NNFEJVN

    NMBSHF αʔϏε਺  ਺ഒ λεΫ਺  ਺ഒ QSPEVDUJPO؀ڥͷਪҠ
  16. ίϯςφӡ༻͍͍ʂʂ &$4΋͍͍ ͍͍Αɺ͍͍Μ͚ͩͲ΋ ΋ͬͱ͓͍͖͍҆ͯͨ͘͠

  17. &$4Λ&$Ͱ࡞Δ৔߹ w σϓϩΠͷͨΊʹ༨৒ͳϦιʔε͕͍Δ w εέʔϧΠϯ͠ʹ͍͘

  18. .BYJNVNQFSDFOUΛʹ͍ͨ͠ w Ұ࣌తʹEFTJSFE$PVOUͷഒͷۭ͖༰ྔ͕͍ Δ w EFTJSFE$PVOU͕ͩͱݸͷUBTL͕Ұ࣌త ʹ্ཱ͕ͪΔ w ಈతϙʔτϚοϐϯάͰ͖ͯͳ͍ͱ͞Βʹ൵ ࢂͳ͜ͱʹ

    i-0001 task task i-0001 task task task task ৽͍͠UBTL͕ ऩ·Γ͖Βͳ͍ ͷͰ༨৒Πϯε λϯε͕ඞཁ i-0002
  19. .BYJNVNNJOJNVNͰઅ໿ ͸Ͱ͖Δ͚Ͳɾɾ w গͣͭ͠ೖΕସ͑Λ͢ΔͷͰશ෦ೖΕସΘΔ· Ͱʹ͕͔͔࣌ؒΔ i-0001 task task i-0001 task

    task i-0001 task task i-0001 task i-0001 task
  20. εέʔϧΠϯ͠ʹ͍͘ w BVUPTDBMJOHͰεέʔϧΠϯ͢Δͱ͖ʹ ESBJOJOHର৅Λબ΂ͳ͍ʢݸผʹ QSPUFDU͢Ε͹͍͚Δʣ  %SBJOJOHΨνϟ

  21. εέʔϧΠϯ͠ʹ͍͘ w σϓϩΠͷ͚࣌ͩ૿΍ͯ͠΋ͦ͜ΛҰ࣌ తͳ৔ॴͱͯ͠σϓϩΠʹ࢖ͬͯ͘ΕΔ Θ͚Ͱ͸ͳ͍ʢຬวͳ͘λεΫ͕ࢄΒ ͹ΔͷͰESBJOJOHͰ͖ͳ͍ʣ i-0001 task task task

    task ཧ૝ ݱ࣮ i-0002 i-0001 task task task task i-0002 Ͳͬͪ΋ফͤͳ͍
  22. ɾΫϥελʔ࡞Βͳ͍͍ͯ͘ ɾඵ՝ۚ

  23. අ༻Λൺֱ ͯ͠ΈΑ͏

  24. ϦϦʔε౰ॳ ࠓ Ϋϥελʔ਺   ίϯςφΠϯελϯε਺ े਺୆ ਺ഒ ΠϯελϯελΠϓ NNFEJVN

    NMBSHF αʔϏε਺  ਺ഒ λεΫ਺  ਺ഒ ·ͣ͸&$ͰΫϥελʔཱͯͨ৔߹ͷྉۚΛܭࢉ
  25. NMBSHFI    NPOUI  ୆ NPOUI Ծʹ୆ͱͯ͠ܭࢉ

  26. W$16 NFNPSZ શମʹ઎ΊΔ UBTL਺ͷׂ߹ "1*H31$  (#  ίϯςϯπ ೖߘ"1*

     (#  8FC഑৴ OHJOY  (#  ίϯςϯπ ഑৴OHJOY  (#  QSPEVDUJPO؀ڥͷUBTL
  27. QSPEVDUJPO؀ڥͷUBTL W$16 NFNPSZ શମʹ઎ΊΔ UBTL਺ͷׂ߹ "1*H31$  (#  ίϯςϯπ

    ೖߘ"1*  (#  8FC഑৴ OHJOY  (#  ίϯςϯπ ഑৴OHJOY  (#  ·ͣ͸͜͜Λܭࢉͯ͠ΈΔ
  28. NMBSHFI    NPOUI  ୆ NPOUI W$16ɺ(# 

       I    NPOUI ࣌ؒW$16͋ͨΓ ࣌ؒ(#ϝϞϦ͋ͨΓ (# ϲ݄෼ͷI EBZTΛ͔͚Δ
  29. NMBSHFI    NPOUI  ୆ NPOUI W$16ɺ(# 

       I    NPOUI  UBTL NPOUI ݱঢ়୆͋ͨΓUBTL͕ฏۉݸ ೖ͍ͬͯΔͷͰɺ ୆ͷ৔߹͸ UBTL UBTL ͱԾఆͯ͠ܭࢉ
  30. W$16 NFNPSZ શମʹ઎ΊΔ UBTL਺ͷׂ߹ ߹ܭNPOUI "1*H31$  (#  

    ίϯςϯπ ೖߘ"1*  (#   8FC഑৴ OHJOY  (#   ίϯςϯπ ഑৴OHJOY  (#    QSPEVDUJPO؀ڥͷUBTL
  31. NMBSHFI    NPOUI  ୆ NPOUI W$16ɺ(# 

       I    NPOUI UBTL૯߹ܭ ฏۉ ୆  NPOUI
  32. NMBSHFI    NPOUI  ୆ NPOUI W$16ɺ(# 

       I    NPOUI UBTL૯߹ܭ ฏۉ ୆  NPOUI 'BSHBUFͷํ͕໿ׂߴ ͚ͩͲɺਓ݅අߟ͑ͨΒɾɾʁ
  33. ͦΜͳʹѱ͘ͳ͍☺

  34. NBYJNVNQFSDFOUΛʹؾܰʹͰ͖Δ w ඵ՝ۚͳͷͰҰ࣌తʹ૿͑Δ෼͸΄΅ແ ࢹͰ͖Δ w αʔϏεҰͭͣͭ͡Όͳ͘શαʔϏε ฒྻͰҰ౓ʹσϓϩΠͰ͖Δ serviceA task:1 task:1

    task:2 task:2 serviceB task:1 task:2 ۭ͖༰ྔΛؾʹ ͠ͳͯ͘ྑ͍ ଴ͪ߹Θͤ͠ͳ ͯ͘ྑ͍
  35. ؾܰʹ૿΍ͤΔ w JOTV⒏DJFOUDQVʹ೰·͞Εͳ͍ w αʔϏε௥Ճ࣌΋BVUPTDMBJOHؾʹ͠ͳ ͍ BVUPTDBMJOHͷ਺͸ ؅ཧ͠ͳͯ͘0,

  36. ؾܰʹݮΒͤΔ w %SBJOJOHର৅Λߟ͑ͳͯ͘ྑ͍ w ؾܰʹεέʔϧΠϯɾΞ΢τ͕Մೳʹͳ Δ w FY໷த͸UBTLΛݮΒ͢ͳͲ taskA taskA

    taskA taskA taskB taskB UBTL"Λ taskA taskA taskB taskB ר͖ࠐΜͰผͷ 5BTLΛLJMM͠ͳ ͍
  37. ՝୊

  38. 'BSHBUFʹͨ͠৔߹ͷ՝୊ w 5BTLͭʹରͯ͠&/*͕ͭBUUBDI͞ΕΔͷͰ&/*ͷ੍ ݶΛؾʹ͠ͳ͍ͱ͍͚ͳ͍71$σϑΥϧτͰ w TVCOFU಺ͷ*1͕ރׇ͢Δࣾ಺ࣄ৘Ͱ੍ݶ͞Ε͍ͯ ͨΓ͢Δͱݫ͍͠ w %BUBEPHBHFOUΛͲ͜ʹ͍ΕΔ͔TJEFDBSύλʔ ϯ͸ͪΐͬͱ໘౗

    w 4QPU'MFFUͱൺֱͯ͠͠·͏ͱྉۚతʹ͸ݫ͍͠ ຊ൪POMZͰ͔͠࢖͑ͳ͍ w ґવͱͯ͠4FSWJDF%JTDPWFSZʹ&-#͕ඞཁ&,4 ʹ͍͖͍ͨ
  39. ੕ʹئ͍Λ ɾUBTL͕উखʹࢭΊΒΕͯ͠·͏͜ͱ͕͋Δ͕ೖࡳՄೳ ʹͳͬͨΒ·ͨىಈͯ͠0''ఔ౓ͷྉۚͰར༻Ͱ͖ Δ'BSHBUFPO4QPU'MFFU ɾ$MVTUFSΛҙࣝ͠ͳͯ͘Α͘ͳͬͨͷͰຊ౰͸&-#΋ ࡞Γͨ͘ͳ͍ %PDLFSpMF͚ͩΛॻ͚͹͍͍ੈք΁

  40. ࠙਌ձͰ͜ͷลΓͷղܾࡦͳͲ Λڭ͑ͯ΋Β͍͍ͨͰ͢ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠