MicroservicesのCache戦略

962920d4608365b332d0c65f9b3e7ba5?s=47 kosako
August 30, 2018

 MicroservicesのCache戦略

Microservices Meetup vol.8 Lightning Talks Battle!
https://microservices-meetup.connpass.com/event/99190/
でLTしたときの資料

962920d4608365b332d0c65f9b3e7ba5?s=128

kosako

August 30, 2018
Tweet

Transcript

  1. .JDSPTFSWJDFTͷ$BDIFઓུ  .JDSPTFSWJDFT.FFUVQWPM-JHIUOJOH5BMLT#BUUMF "LJIJSP,PTBLP

  2. ɾ"LJIJSP,PTBLP ɾٕज़౷ׅ.(3 ɾ΍ͬͯΔ͜ͱ ΤϯδχΞ૊৫Ϛωδϝϯτ શମͷϓϩμΫτϚωʔδϟʔ ٕज़ෛ࠴΍՝୊΁ͷऔΓ૊Έ ΋ͱ΋ͱ͸J04ΞϓϦാ About Me

  3. ࠃ಺/P໊࣮άϧϝαʔϏε3FUUZͷӡӦ ݄ؒສ66 ೔ຊɾ߳ߓɾλΠͰαʔϏεఏڙ

  4. w 1)1ͰϞϊϦγοΫ ਺(#  w ೥ϞϊͷϨΨγʔίʔυ w ΞϓϦ༻ͷ"1*ͳͲҰ෦͸ผαʔϏεͱͯ͠੾Γग़͕ͨ͠ɺ ґવͱͯ͠8&#ͷओཁ෦෼͕ϞϊϦγοΫͳ·· w

    ฐࣾ΋෼அ͞ΕͨϞϊϦεঢ়ଶͰ͢ ͍ͭ࠷͍ۙΖ͍Ζऔ Γ૊Έ࢝Ίͨ RettyͷαʔϏεʹ͍ͭͯ
  5. ݱࡏ.JDSPTFSWJDFTԽ͍ͯͨ͘͠Ίͷ ϓϩδΣΫτΛ࣮ࢪத

  6. ·ͩ࡞ΓதͳͨΊؒҧ͍ͬͯΔͱ͜Ζ͕͋Ε͹ ͥͻࢦఠΛ͓ئ͍͠·͢

  7. w ޮ཰త w αʔϏεཁ݅ʹద͍ͯ͠Δ Microservicesʹ͓͚ΔCacheઓུ

  8. CacheͷλΠϓ w 55- Ұఆͷ࣌ؒΩϟογϡ͢Δ TTL͕ઃఆ͞Εɺͦͷؒݩσʔλ͕ߋ৽͞Εͨͱͯ͠΋มߋ͕൓ө͞Εͳ͍ w Ұ؏ੑ DB CacheͷΑ͏ͳσʔλͷҰ؏ੑ͕อূ͞Ε͍ͯΔλΠϓ
 σʔλͷߋ৽࣌ʹΩϟογϡΛΫϦΞͨ͠Γɺॻ͖׵͑Δ

  9. TTLλΠϓ w ؾΛ͚ͭͳ͍ͱ໰୊͕ى͖΍͍͢ w ଟॏΩϟογϡ͞ΕΔߏ଄ʹͳ͍ͬͯΔͱߋ৽࣌ظ͕ίϯ τϩʔϧͰ͖ͳ͍ w ಛఆͷσʔλΛ࠷৽ʹͰ͖ͳ͍ͱ͍ͬͨ͜ͱ΍ɺ55-ͷઃ ఆͷϛεʹΑͬͯΩϟογϡ͕͍ͭ·Ͱ΋ͷ͜ΔͳͲ

  10. "1*
 (BUFXBZ .JDSPTFSWJDF .JDSPTFSWJDF .JDSPTFSWJDF 3%# 3%# .JDSPTFSWJDF .JDSPTFSWJDF

  11. "1*
 (BUFXBZ .JDSPTFSWJDF .JDSPTFSWJDF .JDSPTFSWJDF 3%# 3%# .JDSPTFSWJDF .JDSPTFSWJDF $%/

  12. API Gateway Cache w ͦ΋ͦ΋ύϑΥʔϚϯεʹ໰୊ͳ͍ͳΒͳͯ͘Α͍ w બ୒ࢶ͕͋Δ w "1*"HHSFHBUJPOͨ݁͠ՌͷσʔλΛΩϟογϡ͢Δ w

    "HHSFHBUJPOલͷσʔλΛΩϟογϡ͢Δ
  13. Aggregationͨ݁͠ՌͷσʔλΛCache w γϯϓϧ੍͕ͩ໿͕ଟ͍ w QSPT w ؅ཧ͕ൺֱతϥΫ w σʔλͷϦϑϨογϡ΋γϯϓϧ w

    DPOT w 55-Λ௕͘͠ਏ͍ w ҰׅͰ͔͠Ωϟογϡͷߋ৽͕Ͱ͖ͳ͍ w Ωϟογϡޮ཰͕ѱ͘ͳΓ΍͍͢ w ࡉ͔͍νϡʔχϯά͸΍ΓͣΒ͍ w ղܾͰ͖ͳ͍໰୊͕ग़ͯ͘ΔՄೳੑ͕͋Δ
  14. AggregationલͷσʔλΛCache w ෳࡶ͕ͩΩϟογϡޮ཰͸Α͍ w QSPT w .JDSPTFSWJDF͝ͱʹద੾ͳ55-ΛઃఆͰ͖Δ w Ωϟογϡޮ཰Λߴ͘Ͱ͖Δ w

    ॏͯ͘ߋ৽ස౓͕௿ͯ͘Α͍ΩϟογϡΛ௕ͨ͘͠ΓͰ͖Δ w DPOT w ؅ཧ͕ෳࡶʹ΍Γ΍͍͢ w 55-ͷઃܭ΍ઃఆ͕.JDSPTFSWJDF͝ͱʹඞཁ w σʔλͷϦϑϨογϡ͕ෳࡶ
  15. w αʔϏεͷཁ݅ʹΑͬͯΩϟογϡઓུ͸ҟͳΔ w ݱࡏͱ͋Δఔ౓ະདྷΛΛݟਾ͑ͨΩϟογϡઓུ͕ඞཁ w "1*(BUFXBZͰͷ$BDIF͸Α͘ߟ͑ͯ࠾༻͠Α͏ ·ͱΊ

  16. 8F`SF)JSJOH IUUQTDPSQSFUUZNFSFDSVJU