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

マルチクラウドで構築する大規模解析サービス/戦略とポイントについて/

tik-son
February 15, 2018

 マルチクラウドで構築する大規模解析サービス/戦略とポイントについて/

デブサミ2018でお話したこと。
http://event.shoeisha.jp/devsumi/20180215/session/1621/

tik-son

February 15, 2018
Tweet

More Decks by tik-son

Other Decks in Technology

Transcript

  1. © 2018 PLAID,Inc. 4IPFT" 4IPFT# d  d  4)011*/($"35

    ๚໰தͷϢʔβʔΛ ϦΞϧλΠϜղੳ ݸʑͷϢʔβʔʹ߹Θͤͨ ίϛϡχέʔγϣϯΛఏڙ 8IBU`T,"35&
  2. © 2018 PLAID,Inc. ಋೖΫϥΠΞϯτ ղੳUU DBͷ༰ྔ τϥοΩϯάΠϕϯτ TB events /

    sec 6000 1430+ 500 ղੳ࣌ؒ ඵ 0.x UU 12.5ԯ ྲྀ௨ֹۚ ԁ / ೥ 5000ԯ 4UBUTPG,"35& ΫϥΠΞϯτ
  3. © 2018 PLAID,Inc. Analyze Ωϡʔ ϦΞϧλΠϜղੳͷྲྀΕ ߦಈϩάऩूϓϩηε ෛՙίϯτϩʔϧͷͨΊͷ ΩϡʔΠϯά ղੳϓϩηε

    ղੳσʔλอଘ - ௿ϨΠςϯγʔ͚ͩͲϑϧϚωʔδυͰ͸ͳ͍ - ಥવͷϝϯςφϯε - ύϑΥʔϚϯεͷݶք ղੳσʔλͷऔಘ Track DB
  4. © 2018 PLAID,Inc. - DBͷ࢓༷͕KARTEͱ૬ੑ͕ѱ͔ͬͨ - ΧλϩάεϖοΫ௨ΓʹύϑΥʔϚϯεग़ͳ͍ - ࢖͏΄ͲΤΫεϙωϯγϟϧʹίετ͕͔͔Δ ϦΞϧλΠϜղੳͷྲྀΕ

    ߦಈϩάऩूϓϩηε ෛՙίϯτϩʔϧͷͨΊͷ ΩϡʔΠϯά ղੳϓϩηε ղੳσʔλอଘ Ωϡʔ Analyze ղੳσʔλͷऔಘ DB Track - ௿ϨΠςϯγʔ͚ͩͲϑϧϚωʔδυͰ͸ͳ͍ - ಥવͷϝϯςφϯε - ύϑΥʔϚϯεͷݶք
  5. © 2018 PLAID,Inc. redis enterpriseΛΫϥ΢υͰఏڙ͍ͯ͠ΔαʔϏε ಛ௃ - ߴ͍εέʔϥϏϦςΟ - ࢓্༷σʔλ༰ྔɺίϯϐϡʔλϦιʔεͷ੍ݶ͕ͳ͘ɺෛՙʹԠͯࣗ͡ಈͰεέʔϧ

    - ௿ϨΠςϯγɺߴύϑΥʔϚϯε - Latency 0.1ms - ReadOps 3kOps/sec, WriteOps 11kOps/sec - ϑϧϚωʔδυαʔϏε - ΍Δ͜ͱ͸ॳظઃఆͷΈ - ߴՄ༻ੑ - ೋ೥ؒେ͖ͳো֐͕ͳ͍ - DBͷσʔλྔʹΑΔैྔ՝ۚɻωοτϫʔΫίετͰ͸՝ۚ͞Εͳ͍ɻ ௿ϨΠςϯγɺεέʔϥϒϧͳΩϡʔΛ௿ίετͰར༻Ͱ͖ΔΑ͏ʹ SFEJTDMPVE
  6. © 2018 PLAID,Inc. GoogleͷαʔϏε಺Ͱར༻͍ͯ͠Δٕज़ΛΫϥ΢υͰఏڙ ಛ௃ - ߴ͍εέʔϥϏϦςΟ - ࢓্༷σʔλ༰ྔͷ੍ݶ͕ͳ͍ɻ140TB -

    ύϑΥʔϚϯεΞοϓͷͨΊͷεέʔϧΞοϓ͸खಈ͕ͩɺμ΢ϯλΠϜͳ͘ॠ࣌ʹ࣮ߦ - ߴՄ༻ੑ - ೋ೥ؒେ͖ͳো֐͕ͳ͍ - ௿ϨΠςϯγɺߴύϑΥʔϚϯε - Latency -20ms - Readεϧʔϓοτ 1.3GB/sec, Writeεϧʔϓοτ 2.3MB/sec - ϑϧϚωʔδυαʔϏε $MPVE#JHUBCMF ΧλϩάεϖοΫҎ্ͷߴ͍ύϑΥʔϚϯε
  7. © 2018 PLAID,Inc. Analyze - ύϑΥʔϚϯε/҆ఆੑ͕޲্ - αʔϏεར༻ίετ͕30%࡟ݮ - ӡ༻ʹ͔͚Δ࣌ؒͷ࡟ݮ

    ߦಈϩάऩूϓϩηε ෛՙίϯτϩʔϧͷͨΊͷ ΩϡʔΠϯά ղੳϓϩηε ղੳσʔλอଘ ղੳσʔλͷऔಘ Track
  8. © 2018 PLAID,Inc. ͲΕ͚ͩૉ੖Β͍͠αʔϏεͰ΋ো֐͸ى͖Δ - 2017/3ͷS3ͷେن໛ো֐(https://aws.amazon.com/jp/message/41926/) - ໿3࣌ؒɺUS-EAST-1ͷS3͕࢖͑ͳ͘ͳΓɺଟ͘ͷαʔϏε͕μ΢ϯ - S3͸99.99ͷSLA

    ো֐ͷதʹ͸γϯάϧΫϥ΢υͰ͸ରԠ͠Α͏͕ͳ͍΋ͷ΋ଘࡏ͢Δ - ωοτϫʔΫͳͲڞ௨෦෼ͷো֐ - Ϧʔδϣϯ/κʔϯͷ֓೦Λ࣋ͨͳ͍ϚωʔδυαʔϏεͷো֐
  9. © 2018 PLAID,Inc. ֤ϓϩόΠμʔࣅͨΑ͏ͳαʔϏεΛఏڙ͍ͯ͠ΔͷͰɺ༷ʑͳ৔ॴͰ࣮ݱՄೳ શͯͰ͜ͷߏ੒ΛͱΔͷ͸೉͍͠ͷͰɺಋೖ෦෼ʹ͍ͭͯ͸ݟۃΊ͕ඞཁ - γεςϜͱͯ͠ͷॏཁ͞ - ࣮ݱͷ೉қ౓ ཁ݅ʹԠͯ͡ɺͲ͜·Ͱ࡞ΓࠐΉ͔ߟ͑Δ

    - ଟগίεύ͕ѱͯ͘΋ಈ͚͹͍͍ - खಈͰ੾Γସ͑Ε͹͍͍ ϦΞϧλΠϜղੳʹؔΘΔॏཁͳ෦෼͸ ग़དྷΔ͚ͩෳ਺ͷϓϩόΠμʔͰಈ͔ͤΔΑ͏ʹ͍ͯ͠Δ GCS S3 CloudCDN CloudFront
  10. © 2018 PLAID,Inc. ௨৴ίετ͕਺ඦഒʹͳͬͨ࿩ ผϓϩόΠμʔͷαʔϏε΁ͷ௨৴ͷίετʹ஫ҙ - ϦΞϧλΠϜղੳͰͷBigtableͱEC2ͷ௨৴Ͱର৅ - Bigtable΁ͷසൟͳRead/WriteʹΑΓίετ૿ -

    Bigtable͸ಉ͡zone͔Βͷ௨৴͸ίετ͸͔͔Βͳ͍ - Bigtableͱಉ͡zoneʹGCEΛߏங - ෭࣍తͳޮՌͱͯ͠ɺ҆ఆੑ/Latency͕޲্ - AWS͸GCPͷόοΫΞοϓܥʹ NBJO TUBOECZ NBJO
  11. © 2018 PLAID,Inc. ผϓϩόΠμ΁ͷ71/ܦ༝ͷ௨৴ͷଳҬʹ஫ҙ ωοτϫʔΫͷεϧʔϓοτ͕ஶ͘͠௿Լͨ͠࿩ - GCPʹReadReplicaΛ࡞ΓɺVPNͷ௨৴ྔ࡟ݮ - ෳ਺VPNτϯωϧʹIPϧʔςΟϯάͰෛՙ෼ࢄ -

    ଳҬΛ؂ࢹ͠ɺඞཁʹԠͯ͡τϯωϧΛ௥Ճ - GCPͱAWS઀ଓͷͨΊͷVPN෦෼ - GCE͔ΒMongo(EC2)΁ͷେྔͷRead - VPNͷଳҬ͕ανΓϘτϧωοΫ - 1.5Gps/1VPNτϯωϧ(GCP) - ଳҬʹ͸ಛʹ੍ݶͳ͠(AWS) IUUQUFDIQMBJEDPKQBXT@HDQ@NVMUJDMPVE@
  12. © 2018 PLAID,Inc. Ϋϥ΢υαʔϏεͱ͍ͬͯ΋ࣗ෼ͨͪͰ໘౗Λݟͳ͍ͱ͍͚ͳ͍෦෼͕͋Δ - ߏ੒؅ཧ - ؂ࢹ - ΞϓϦέʔγϣϯͷσϓϩΠ

    ͳͲ ӡ༻Λิॿ͢ΔαʔϏε͸֤ϓϩόΠμͰͦΕͧΕಠࣗͷϑΥʔϚοτ - ྫ͑͹ߏ੒؅ཧ DeploymentManager CloudFormation
  13. © 2018 PLAID,Inc. ࣗ෼ͨͪͰ։ൃʁ - ϓϩόΠμ͕૿͑ΔͭͲେ͖ͳ։ൃ͕ඞཁ - ର৅͸ߏ੒؅ཧɺΞϓϦέʔγϣϯͷσϓϩΠɺ؂ࢹͳͲ - ίετେͰϓϩόΠμΛؾܰʹ૿΍ͤͳ͍

    ಉ͡՝୊ײΛ๊͍͑ͯΔਓ͸݁ߏ͍Δ OSSɺαʔυύʔςΟͷαʔϏεΛ͏·͘ར༻͢Δ ౷ҰతͳΠϯλʔϑΣʔεΛͲ͏࡞Δ͔ʁ