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

アクセス頻度予測に基づく仮想サーバの計画的オートスケーリング / scheduled-autoscaling-of-virtual-servers-by-access-frequency-prediction-fit2018

monochromegane
September 25, 2018

アクセス頻度予測に基づく仮想サーバの計画的オートスケーリング / scheduled-autoscaling-of-virtual-servers-by-access-frequency-prediction-fit2018

monochromegane

September 25, 2018
Tweet

More Decks by monochromegane

Other Decks in Technology

Transcript

  1. ࡾ୐༔հɺদຊ྄հɺྗ෢݈࣍*ɺ܀ྛ݈ଠ࿠ / ϖύϘݚڀॴ / *ྗ෢݈ٕ࣍ज़࢜ࣄ຿ॴ
    2018.09.19 FIT2018 ୈ17ճ৘ใՊֶٕज़ϑΥʔϥϜ
    ΞΫηεස౓༧ଌʹجͮ͘
    Ծ૝αʔόͷܭըతΦʔτεέʔϦϯά

    View full-size slide

  2. 1. Ծ૝αʔόӡ༻୆਺࠷దԽͷഎܠͱຊݚڀͷ໨త
    2. ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊
    3. ΞΫηεස౓༧ଌʹجͮ͘Ծ૝αʔόͷܭըతΦʔτε
    έʔϦϯά
    4. ࣮ݧͱߟ࡯
    5. ·ͱΊ
    2
    ໨࣍

    View full-size slide

  3. 1.
    Ծ૝αʔόӡ༻୆਺࠷దԽͷഎܠͱ
    ຊݚڀͷ໨త

    View full-size slide

  4. • Ϋϥ΢υαʔϏεͷීٴ
    • ར༻ऀಈ޲ʹ߹ΘͤͯΞΫηεස౓͕มಈ͢ΔWebαʔϏε
    ӡ༻ʹͱͬͯॊೈͳߏ੒มߋ͕ՄೳͳΫϥ΢υαʔϏε͸਌࿨
    ੑ͕ߴ͍
    • Ϋϥ΢υαʔϏε͸ैྔ՝͕ۚओྲྀ
    • ॲཧೳྗΛอͪͭͭඞཁ࠷খݶ਺ͷԾ૝αʔόͰӡ༻͠ར༻ྉ
    ۚΛ཈੍͢Δඞཁ͕͋Δ
    4
    ݚڀͷഎܠ

    View full-size slide

  5. • Ծ૝αʔόىಈ׬ྃ·Ͱͷ࣌ؒࠩʹىҼ͢ΔҰ࣌తͳॲཧੑೳ
    ͷෆ଍
    • ΦʔτεέʔϦϯάܖػͷج४ܾఆ͕ࠔ೉
    5
    ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊
    ߴਫ਼౓ͳधཁ༧ଌʹجͮ͘ܭըతͳԾ૝αʔόͷࣄલ४උ

    View full-size slide

  6. • WebΞϓϦέʔγϣϯߏ੒ͷෳࡶ͞ʹґଘ͠ͳ͍
    • ༧ଌਫ਼౓޲্ͷͨΊधཁʹӨڹΛ༩͑ΔཁҼΛߟྀ͢Δ
    • Ծ૝αʔόͷෛՙ͕ҰఆʹอͨΕͨ҆ఆ͔ͭޮ཰తͳӡ༻
    6
    ຊݚڀͷ໨త
    ߴਫ਼౓ͳधཁ༧ଌʹجͮ͘ܭըతͳΦʔτεέʔϦϯά

    View full-size slide

  7. 2.
    ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊

    View full-size slide

  8. • ϦιʔεมಈΛܖػͱ͢Δ൓Ԡతʹαʔόधཁʹ௥ै͢Δߏ੒
    มߋͰ͸Ұ࣌తͳॲཧੑೳͷෆ଍Λආ͚ΒΕͳ͍
    1. ௥Ճࢦ͔ࣔΒىಈ׬ྃ·Ͱͷ࣌ؒࠩ
    2. धཁաෆ଍Λݕ஌͢Δ·Ͱͷ࣌ؒࠩ
    8
    ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊
    Ծ૝αʔόىಈ࣌ؒࠩʹىҼ͢ΔҰ࣌తͳॲཧੑೳͷෆ଍

    View full-size slide

  9. • ϦιʔεมಈͱWebαʔϏεશମͷؔ܎ੑΛ೺Ѳ͠ɺద੾ͳ
    ࢦඪͱᮢ஋Λܾఆ͢Δ͜ͱ͸ࠔ೉
    • ࣌ؒ͝ͱͷWebαʔϏεར༻ಈ޲ͷਪҠ͕ଟ͘ͷཁҼ͔Βߏ
    ੒͞ΕΔ৔߹ɺద੾ͳࢦඪͱᮢ஋Λܾఆ͢Δ͜ͱ͸ࠔ೉
    9
    ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊
    ΦʔτεέʔϦϯάܖػͷج४ܾఆ͕ࠔ೉

    View full-size slide

  10. • աڈͷαʔόधཁ܏޲ʹج͖ͮ౷ܭతʹݟੵ΋Δख๏Ͱ͸൓෮
    ܏޲ͷͳ͍ෆఆظͳཁҼΛ༧ଌʹऔΓࠐΊͳ͍
    • ωοτϫʔΫͷτϥώοΫ͸ٳ೔ͳͲͷཁҼʹΑΓมಈ͕͋Δ͜ͱ͕஌ΒΕ
    ͓ͯΓɺWebαʔϏεಈ޲༧ଌʹ΋Ԡ༻Ͱ͖Δͱߟ͑ΒΕΔɻ
    10
    ैདྷͷԾ૝αʔόӡ༻୆਺࠷దԽͷ՝୊
    αʔόधཁͷࣗಈ༧ଌͱ༧ଌਫ਼౓

    View full-size slide

  11. 3.
    ΞΫηεස౓༧ଌʹجͮ͘
    Ծ૝αʔόͷܭըతΦʔτεέʔϦϯά

    View full-size slide

  12. 12
    ఏҊख๏
    • WebαʔϏεશମͰҰఆ࣌ؒʹॲཧͨ͠ΞΫηεස౓Ͱ͋Δ
    εϧʔϓοτΛࢦඪͱ͠ɺӡ༻্ɺܦݧతʹ೺Ѳ͞Ε͍ͯΔ҆
    ఆͯ͠ӡ༻Մೳͳ஋Λ໨ࢦ͢
    • աڈͷΞΫηεස౓܏޲ͱෆఆظͳมಈཁҼ͔Β༧ଌϞσϧΛ
    ಋ͘
    • ༧ଌతͳߏ੒มߋΛ՝ۚ୯ҐͰ͋Δ1࣌ؒΛ୯Ґʹߦ͏
    ΞΫηεස౓༧ଌʹجͮ͘Ծ૝αʔόͷܭըతΦʔτεέʔϦϯά

    View full-size slide

  13. 13
    ఏҊख๏

    View full-size slide

  14. 14
    ΞΫηεස౓༧ଌϞσϧ
    • ௕ظؒͷ࣌ܥྻσʔλʹରͯ͠༧ଌਫ਼౓ͷߴ͍LSTMΛ༻͍Δ
    • աڈͷ࣌ܥྻσʔλʹՃ͑ɺWebαʔϏεӡ༻ͷதͰ֫ಘ͠
    ͖ͯͨΞΫηεස౓΁ӨڹΛ༩͑ΔෆఆظͳཁҼ΋ೖྗͱ͢Δ

    View full-size slide

  15. 15
    ΞΫηεස౓༧ଌϞσϧ
    ,FSBTʹΑΔΞΫηεස౓༧ଌͷ࣮૷
    -45.ϞσϧΛఆٛ
    ֶशΛऩଋͤ͞ΔͨΊೖྗ஋Λਖ਼نԽ
    ͢Δ૚Λఆٛ
    աڈΞΫηεස౓ͱ֎తཁҼΛݩʹֶश

    View full-size slide

  16. 16
    ΞΫηεස౓༧ଌϞσϧ
    ΞΫηεස౓༧ଌϞσϧ
    ֶशσʔλ͸Ϋϥ΢υαʔϏεͷඪ४՝
    ۚ୯ҐͰ͋Δ࣌ؒΛཻ౓ͱ͢Δ
    8FCαʔϏεͷ࠷୹ఆৗੑΛ֬ೝͰ͖Δ࣌ؒ෼ͷσʔλ
    Λೖྗͱ͠ɺ࣍ͷ࣌ؒ෼ͷΞΫηεස౓༧ଌΛग़ྗͱ͢Δ
    ˞࣌ؒޙҎ߱͸༧ଌ෼ΛؚΊͨظΛೖྗͱ͢Δ

    View full-size slide

  17. 17
    Ծ૝αʔό୆਺ࢉग़
    • ༧ଌͨ͠ΞΫηεස౓ΛجʹɺWebαʔϏεΛ҆ఆͯ͠ӡ༻
    Ͱ͖Δ໨҆ͱͳΔεϧʔϓοτ஋Λ֬อͰ͖Δ୆਺ΛٻΊΔ
    ༧ଌΞΫηεස౓ʹର͠εϧʔϓοτΛ
    ֬อͰ͖Δ୆਺Λࢉग़͢Δ
    5<ΞΫηεස౓෼>
    1<༧ଌΞΫηεස౓࣌>
    -αʔό୆਺Լݶ஋

    View full-size slide

  18. 4.
    ࣮ݧͱߟ࡯

    View full-size slide

  19. • WebαʔϏεͷϓϩμΫγϣϯ؀ڥʹΞΫηεස౓༧ଌͳΒͼ
    ʹαʔό୆਺ࢉग़γεςϜΛಋೖ͠ɺٻΊͨ୆਺ʹج͖ͮܭը
    తΦʔτεέʔϦϯάΛ࣮ࢪ
    • ҟͳΔΞΫηε܏޲ͷ͋Δ2ͭͷαʔό܈Λର৅ͱͨ͠
    • ඇఆৗͷཁҼͷՃຯʹΑΔΞΫηεස౓༧ଌਫ਼౓ͷධՁ
    • ఏҊख๏ʹΑΔॲཧੑೳͱԾ૝αʔό୆਺ͷ࠷దԽͷධՁ
    19
    ධՁํ๏ͱධՁ؀ڥ

    View full-size slide

  20. • WebαʔϏεӡ༻ऀ͕ӡ༻ͷதͰ֫ಘ͖ͯͨ͠ΞΫηεස౓
    ʹӨڹΛ༩͑ΔෆఆظཁҼ
    • શར༻ऀ޲͚ͷϓογϡ഑৴
    • ࣌ؒݶఆΩϟϯϖʔϯ
    20
    ඇఆৗͷཁҼͷՃຯʹΑΔ༧ଌਫ਼౓ͷධՁ

    View full-size slide

  21. • ࠓճͷධՁͰ͸ɺର৅ͷ
    WebαʔϏεʹ͓͍ͯཌ೔
    ͕ฏ೔ͷ৔߹ɺ໷ؒʹΞΫ
    ηεස౓͕૿Ճ͢Δͱ͍͏
    ܦݧଇΛཁҼͱͯ͠Ճ͑ͨ
    21
    ඇఆৗͷཁҼͷՃຯʹΑΔ༧ଌਫ਼౓ͷධՁ

    View full-size slide

  22. 22
    ඇఆৗͷཁҼͷՃຯʹΑΔ༧ଌਫ਼౓ͷධՁ
    ඇఆৗͷཁҼΛؚ·ͳ͍ ඇఆৗͷཁҼΛؚΉ
    ฏۉೋ৐ޡࠩ "܈

    ฏۉೋ৐ޡࠩ #܈

    • ֶशɺݕূσʔλʹର͢Δ༧ଌਫ਼౓Λฏۉೋ৐ޡࠩͰൺֱ

    View full-size slide

  23. 23
    ඇఆৗͷཁҼͷՃຯʹΑΔ༧ଌਫ਼౓ͷධՁ
    ໷ؒʹීஈͱҟͳΔ܏޲ͱͳΔಛੑΛଊ
    ͑ͨ༧ଌ͕ߦΘΕ͍ͯΔɻ

    View full-size slide

  24. • ඇఆৗͷཁҼΛՃຯ͢Δ͜ͱʹΑΓ͍ͣΕͷ܈Ͱ΋ਫ਼౓ͷ޲্
    ͕ݟΒΕͨ
    • ཌ೔͕ฏ೔Ͱ͋Δ৔߹ͷ໷ؒଳͷΞΫηεස౓܏޲ͷಛੑΛଊ
    ͑ͨ༧ଌ͕Ͱ͖ͨ
    • ൓ରʹཁҼ͕Өڹ͠ͳ͍࣌ؒଳʹ͍ͭͯ͸ཁҼʹΑΓ༧ଌਫ਼౓
    ͕Լ͕Δ৔߹΋͋ΔͨΊɺཁҼͷ࡞༻͢Δ࣌ؒଳΛߜΓࠐΉ౳
    ͷ޻෉ʹΑΓਫ਼౓վળ͕ظ଴Ͱ͖Δ
    24
    ߟ࡯

    View full-size slide

  25. • ΞΫηεස౓༧ଌΛ༻͍ͨܭըతΦʔτεέʔϦϯάʹΑΔॲ
    ཧੑೳͱԾ૝αʔό୆਺ͷ࠷దԽΛධՁ
    • ༨৒ͳԾ૝αʔόͷىಈ͕཈੍͞Εͨ͜ͱΛݕূ
    • ௐ੔͞ΕͨԾ૝αʔό୆਺͕ద੾Ͱ͋Δ͜ͱΛݕূ
    25
    ܭըతΦʔτεέʔϦϯάͷධՁ

    View full-size slide

  26. 26
    ܭըతΦʔτεέʔϦϯάͷධՁ
    Ծ૝αʔό୆਺ͷਪҠ
    ೔͋ͨΓͷαʔό૯ىಈ࣌ؒ͸"܈ ը૾্

    Ͱ͔࣌ؒΒ࣌ؒʹɺ#܈ ը૾Լ
    Ͱ
    ͸ ͔࣌ؒΒ࣌ؒʹ࡟ݮ
    ˞"܈ͷ࣌͸ࢉग़୆਺͕୆਺Լݶ஋ΛԼ
    ճͬͨͨΊɺ୆਺ͷมಈ͸ݟΒΕͳ͍

    View full-size slide

  27. 27
    ܭըతΦʔτεέʔϦϯάͷධՁ
    ΞΫηεස౓ͷਪҠ
    ೔͋ͨΓΞΫηεස౓ͷඪ४ภࠩ͸"܈ ը
    ૾্
    Ͱ໿͔Β໿ʹɺ#܈ ը
    ૾Լ
    Ͱ͸໿͔Β໿ʹมԽɻ
    ख๏ద༻ޙʹεϧʔϓοτ͕҆ఆ͍ͯ͠Δ
    ͜ͱ͕Θ͔Δɻ
    ˞"܈ͷ૿Ճ͸Լݶ୆਺ӡ༻ͱͳͬͨ࣌ؒଳ
    ͷ୆͋ͨΓͷεϧʔϓοτ஋૿ՃʹΑΔ΋
    ͷͱߟ͑ΒΕΔ

    View full-size slide

  28. • ఏҊख๏ʹΑΔܭըతΦʔτεέʔϦϯάʹΑΓԾ૝αʔό୆
    ਺Λ࣌ؒ͝ͱʹௐ੔͠ɺ͔ͭɺ1୆͋ͨΓͷΞΫηεස౓͕Ұ
    ఆʹอͨΕͨ͜ͱͰ࠷దͳ୆਺Ͱ҆ఆͨ͠ॲཧੑೳΛอͯΔ͜
    ͱ͕֬ೝͰ͖ͨ
    • εϧʔϓοτ஋ͷΏΒ͗͸࣌ؒଳ͝ͱʹΞΫηε࣌ͷॲཧ಺༰
    ʹภΓ͕ݪҼͱߟ͑ΒΕΔͨΊɺHTTPϦΫΤετϝιουͳ
    Ͳͷछผ͝ͱʹεϧʔϓοτͷ໨҆Λ෼ྨ͢Δ͜ͱͰਫ਼౓޲্
    ͕ظ଴Ͱ͖Δɻ 28
    ߟ࡯

    View full-size slide

  29. • ఏҊख๏Ͱ͋ΔɺΞΫηεස౓༧ଌʹجͮ͘ܭըతΦʔτεέʔ
    ϦϯάʹΑΓɺޮ཰తͰ҆ఆͨ͠αʔό୆਺ʹΑΔӡ༻͕Ͱ͖
    ͨɻ
    • ඇఆৗͷཁҼΛऔΓࠐΉ͜ͱͰWebαʔϏεӡ༻ܦݧଇ΋༧
    ଌʹऔΓࠐΉ͜ͱ͕Ͱ͖ͨɻ
    • ࠓޙ͸൓ԠతͳΦʔτεέʔϦϯάͱ૊Έ߹ΘͤΔ͜ͱͰಥൃ
    తͳΞΫηεස౓มಈʹରԠ͢Δߏ੒Λݕ౼͍ͨ͠
    30
    ·ͱΊ

    View full-size slide