kintone.comのAWS移行と
その舞台裏

 kintone.comのAWS移行と
その舞台裏

Cybozu Tech Meetup #3 US版kintoneのAWS移行とその裏側
https://cybozu.connpass.com/event/179483/

C51ed1e43b09bfbbb09eead09f803aea?s=128

Shin'ya Ueoka

July 14, 2020
Tweet

Transcript

  1. LJOUPOFDPNͷ"84Ҡߦͱ ͦͷ෣୆ཪ $ZCP[V5FDI.FFUVQ  αΠϘ΢ζגࣜձࣾ ্Ԭਅ໵

  2. .F ‰্Ԭਅ໵ !VFPLBOEF  ‰αΠϘ΢ζגࣜձࣾ ‰ٳ೔͸044Λ࡞ͬͨΓจॻΛ ॻ͍͍ͯ·͢ 

  3. kintone.com

  4. LJOUPOF 4

  5. LJOUPOF ‰ۀ຿γεςϜΛ؆୯ʹ࡞ΕΔ##޲͚αʔϏε ‰ࠃ಺֎  ࣾͰಋೖ ‰άϩʔόϧࢢ৔͸ ʮLJOUPOFDPNʯ Ͱల։ 5

  6. άϩʔόϧ΁ͷνϟϨϯδ ‰ࠃ಺ͷച্͸҆ఆͯ͠৳ͼ͍ͯΔ ‰64ࢢ৔Λ͸͡Ίάϩʔόϧʹνϟϯδ͍ͨ͠ ‰ݱ஍ʹ͋ΘͤͨϦϦʔεϑϩʔ΍ൢചઓུ΋͍ͨ͠ 6

  7. ೥໨ͷLJOUPOFͱٕज़త՝୊ ‰ࠃ಺αʔϏεDZCP[VDPNͱಉ͡Πϯϑϥج൫ w௕೥ͷϨΨγʔ͕ཷ·ͬͨϞϊϦεγεςϜʢ˞ʣ ‰૊৫తͳνϟϨϯδ΋ඞཁ wαʔϏε։ൃऀͱӡ༻ऀ͕૊৫తʹ෼͔Ε͍ͯΔ 7 ˞ࠃ಺Πϯϑϥ͸/FDP.BOFLJϓϩδΣΫτ͕ਐߦத

  8. "84Ҡߦͷΰʔϧ ‰64ϦʔδϣϯͰ҆ఆͨ͠αʔϏεఏڙ ‰ࠃ಺ͷγεςϜ͔Βͷಠཱ wݱ஍ʹ߹ΘͤͨϦϦʔεܭըɺൢചઓུ wΫϥ΢υωΠςΟϒͳ։ൃӡ༻ϓϩηεͷཱ֬ 8

  9. "84Ҡߦ͕׬ྃ ‰೥݄ʹ׬શҠߦ͠·ͨ͠ʂ w೥݄৽نސ٬޲͚ϦϦʔε w೥݄طଘސ٬ͷ؀ڥΛ"84ʹҠߦ 9 9݄ ৽نސ٬ ϦϦʔε 6݄ طଘސ٬ͷ


    Ҡߦ (1/3) طଘސ٬ͷ
 Ҡߦ (2/3) طଘސ٬ͷ
 Ҡߦ (3/3) 2020೥4݄ 5݄ L7LB
 ੾Γସ͑ DNS
 Ҡ؅ 2019೥7݄ 8݄ 2018೥1݄ ϓϩδΣΫτ
 ελʔτ
  10. LJOUPOFDPNج൫ͷߏங ʢʙ೥݄ʣ  9݄ ৽نސ٬ ϦϦʔε 6݄ طଘސ٬ͷ
 Ҡߦ (1/3)

    طଘސ٬ͷ
 Ҡߦ (2/3) طଘސ٬ͷ
 Ҡߦ (3/3) 2020೥4݄ 5݄ L7LB
 ੾Γସ͑ DNS
 Ҡ؅ 2019೥7݄ 8݄ 2018೥1݄ ϓϩδΣΫτ
 ελʔτ
  11. LJOUPOFDPNͷΞʔΩςΫνϟ ‰ސ٬ ʢձࣾʣ ͝ͱͷ؀ڥΛఏڙ͢ΔϚϧνςφϯτ ‰֤؀ڥ͝ͱʹҟͳΔ'2%/ 11 bar.kintone.com foo.kintone.com

  12. ߏ੒Λͦͷ··AWS্ʹ Ҡ২ɾɾɾʁ 

  13. ΄ͱΜͲ࡞Γ௚͠·ͨ͠ɹ 

  14. ΞʔΩςΫνϟͷ࡮৽ ‰ҠߦͱڞʹLJOUPOFج൫ͷΞʔΩςΫνϟΛݟ௚͠ 14 cybozu.comج൫ ϛυϧ΢ΣΞ kintone JP ϛυϧ΢ΣΞ kintone US

    (AWS) ৽ن։ൃ ίϯςφԽ ϚωʔδυαʔϏε
 ΁ஔ͖׵͑
  15. ΠϯϑϥϨΠϠ ‰ΠϯϑϥϨΠϠ͸ϚωʔδυαʔϏεΛར༻ w"NB[PO"VSPSBɺ4ɺ"NB[PO&,4 15 ϛυϧ΢ΣΞ kintone

  16. ϛυϧ΢ΣΞ ‰ඇಉظδϣϒ΍ϚϧνςφϯτΛ؅ཧ͢Δ ‰ΞʔΩςΫνϟΛݟ௚ͯ͠,PUMJO΍(PͰ৽ن։ൃ 16 ϛυϧ΢ΣΞ kintone

  17. ,JOUPOFຊମ ‰,JOUPOFຊମΛίϯςφͰಈ͘Α͏ʹ͢Δ ‰ಉ͡ίʔυϕʔεͰಈ࡞Λ%*Ͱ੾Γସ͑Δ 17 ϛυϧ΢ΣΞ kintone

  18. ͦͷଞ΋࡞Γ௚͠ ‰αʔϏεҎ֎ͷ৽ن։ൃ΋࡞Γ௚͠·ͨ͠ w$*$%ύΠϓϥΠϯ wϩάɺϞχλϦϯά wεςʔλεϖʔδ wΦϯίʔϧମ੍ɺΞϥʔτγεςϜ 18

  19. ৽نϦϦʔεͱฒߦӡ༻ ʢ೥݄ʙʣ  9݄ ৽نސ٬ ϦϦʔε 6݄ طଘސ٬ͷ
 Ҡߦ (1/3)

    طଘސ٬ͷ
 Ҡߦ (2/3) طଘސ٬ͷ
 Ҡߦ (3/3) 2020೥4݄ 5݄ L7LB
 ੾Γସ͑ DNS
 Ҡ؅ 2019೥7݄ 8݄ 2018೥1݄ ϓϩδΣΫτ
 ελʔτ
  20. ৽نސ٬޲͚ϦϦʔε ‰೥݄৽نސ٬޲͚ϦϦʔε ‰طଘސ٬͸Ҿ͖ଓ͖೔ຊͷ%$͔Βఏڙ 20

  21. ฒߦӡ༻ ‰શͯͷϦΫΤετ͸"84ͷ"-#Ͱड͚෇͚Δ ‰طଘ؀ڥͷϦΫΤετ͸೔ຊʹϦόʔεϓϩΩγ 21 kintone kintone Internet ϦόʔεϓϩΩγ NGINX NGINX

    AWS ALB AWS JP ৽نސ٬ طଘސ٬
  22. ϏοάόϯϦϦʔεΛආ͚Ζ ‰ϦϦʔεӨڹΛ཈͑ͯ؆୯ʹ੾Γ໭͠Ͱ͖ΔΑ͏ʹ ஈ֊తʹϦϦʔε w݄%/4Λ"84ʹҠ؅ w݄ϩʔυόϥϯαΛ"84ʹ੾Γସ͑ w݄৽نਃ͠ࠐΈઌΛ"84൛LJOUPOFʹ੾Γସ͑ 22

  23. ݄%/4ͷҠ؅ ‰%/4ͷ؅ཧΛ೔ຊͷDZCP[VDPN͔Β"84ʹҠ؅ w LJOUPOFDPNͷ໊લղܾઌ͸Ҿ͖ଓ͖೔ຊͷ%$ 23 kintone NGINX ᶃ foo.kintone.comͷ
 ໊લղܾ

    ᶄ kintoneʹΞΫηε Route 53 AWS JP
  24. ݄ϩʔυόϥϯαͷ੾Γସ͑ ‰)551ϦΫΤετͷड͚ઌΛ"84ଆʹ੾Γସ͑ wʮ LJOUPOFDPNʯͷ໊લղܾͷઌΛ"84ͷ"-#ʹ wϦΫΤετΛ೔ຊ%$ʹϦόʔεϓϩΩγ 24 kintone kintone Internet ϦόʔεϓϩΩγ

    NGINX NGINX AWS ALB AWS JP
  25. ݄৽نސ٬޲͚ϦϦʔε ‰৽نސ٬ͷ؀ڥΛLJOUPOFDPNͷ"84ʹ࡞੒ wLJOUPOFDPN͓ਃ͠ࠐΈઌΛ੾Γସ͑ 25 kintone kintone NGINX NGINX JP AWS

    kintone.com
 ͓ਃ͠ࠐΈϖʔδ ੾Γସ͑
  26. طଘސ٬ͷ"84Ҡߦ ʢ೥݄ʙ݄ʣ  9݄ ৽نސ٬ ϦϦʔε 6݄ طଘސ٬ͷ
 Ҡߦ (1/3)

    طଘސ٬ͷ
 Ҡߦ (2/3) طଘސ٬ͷ
 Ҡߦ (3/3) 2020೥4݄ 5݄ L7LB
 ੾Γସ͑ DNS
 Ҡ؅ 2019೥7݄ 8݄ 2018೥1݄ ϓϩδΣΫτ
 ελʔτ
  27. طଘސ٬ͷҠߦ ‰৽نϦϦʔεҎલͷސ٬σʔλΛ"84ʹҠߦ ‰ఀࢭϝϯςφϯεΛ݄ɺ݄ɺ݄ʹܭը 27 kintone kintone NGINX NGINX AWS (US)

    JP ৽نސ٬ طଘސ٬ Ҿͬӽ͠ʂ
  28. Ҡߦ͢Δର৅σʔλ ‰طଘސ٬ͷLJOUPOF؀ڥΛ"84ʹҠߦ͢Δ wఴ෇ϑΝΠϧ5# wσʔλϕʔε(# wશจݕࡧΠϯσοΫε 28

  29. ‰,JOUPOFͷΦϒδΣΫτετϨʔδ͸XSJUFPODF wࣄલʹࠩ෼సૹΛͯ͠ɺҠߦ౰೔ʹ࢒ΓͷసૹΛ଴ͭ ఴ෇ϑΝΠϧͷҠߦ 29 S3 AWS JP

  30. ‰NZTRMEVNQͨ݁͠ՌΛ4ʹసૹޙɺΠϯϙʔτ σʔλϕʔεͷసૹ 30 Amazon Aurora S3 AWS JP mysqldump import

  31. શจݕࡧͷ࠶ΠϯσΫγϯά ‰ఴ෇ϑΝΠϧɾ%#ͷసૹޙɺΠϯσΫγϯά։࢝ wLJOUPOF಺෦ͷඇಉظδϣϒͰΠϯσΫγϯάΛ࣮ߦ wطʹΩϡʔʹੵ·Ε͍ͨδϣϒ΋࠶։ POINT OF NO RETURN Amazon Aurora

    S3 indexing Elasticsearch kintone จࣈྻநग़ จࣈྻநग़
  32. LJOUPOFDPNͷ͜Ε͔Β ʢ೥݄ʙʣ  9݄ ৽نސ٬ ϦϦʔε 6݄ طଘސ٬ͷ
 Ҡߦ (1/3)

    طଘސ٬ͷ
 Ҡߦ (2/3) طଘސ٬ͷ
 Ҡߦ (3/3) 2020೥4݄ 5݄ L7LB
 ੾Γସ͑ DNS
 Ҡ؅ 2019೥7݄ 8݄ 2018೥1݄ ϓϩδΣΫτ
 ελʔτ
  33. Ҡߦޙͷ64൛LJOUPOF ‰݄͔Β͸LJOUPOF։ൃνʔϜશମͰ։ൃɾӡ༻ ‰ҠߦϓϩδΣΫτதʹͰ͖ͳ͔ͬͨ՝୊΋͋Δ wϢʔβʔɺΞϓϦέʔγϣϯࢹ఺ͷ4-*4-0 w.JDSPTFSWJDFTͳͲͷ୤ϞϊϦε w෼ࢄτϨʔγϯάͳͲΫϥ΢υωΠςΟϒͳ؂ࢹ 33

  34. αΠϘ΢ζͱࠓޙͷLJOUPOFDPN ‰"84Ҡߦ׬ྃ͸ΰʔϧͰ͸ͳ͘৽ͨͳελʔτ ‰ٕज़తɾ૊৫తͳνϟϨϯδ͕Ͱ͖ΔΑ͏ʹͳͬͨ wLJOUPOFDPNͷ҆ఆӡ༻ʹ޲͚ͨνϟϨϯδ wࠃ಺ /FDP.BOFLJ ΁ͷӡ༻஌ݟͷల։ wੈքల։ͷͨΊͷ଍৔ͮ͘Γ 34 Զͨͪͷઓ͍͸·ͩ࢝·ͬͨ͹͔Γͩʂ