Pro Yearly is on sale from $80 to $50! »

Webサーバの高集積マルチテナントアーキテクチャに関する研究

 Webサーバの高集積マルチテナントアーキテクチャに関する研究

松本の研究を通じて高集積ホスティングに関する技術と最新動向を学ぶ

ペパボ研究所 主席研究員/チーフエンジニア 松本亮介
2018年3月27日 小山さんへの高集積ホスティングに関する講義

2b692bd83f4418103142a053ecf5ff59?s=128

MATSUMOTO Ryosuke

March 27, 2018
Tweet

Transcript

  1. দຊͷݚڀΛ௨ͯ͡ߴूੵϗεςΟϯάʹؔ͢Δٕज़ͱ࠷৽ಈ޲ΛֶͿ ϖύϘݚڀॴओ੮ݚڀһνʔϑΤϯδχΞদຊ྄հ ೥݄೔খࢁ͞Μ΁ͷߴूੵϗεςΟϯάʹؔ͢Δߨٛ 8FCαʔόͷߴूੵϚϧνςφϯτ ΞʔΩςΫνϟʹؔ͢Δݚڀ

  2. ຊൃදͷ໨త wদຊͷݚڀΛ௨ͯ͡൚༻తͳϗεςΟϯάٕज़ΛֶͿ wؔ࿈ݚڀ΍جૅ֓೦ɺαʔϏεͷϞσϧΛ஌Δ wߴूੵϗεςΟϯάٕज़ͷ࠷৽ಈ޲Λ஌Δ

  3. ໨࣍ʢʣ  ݚڀͷ໨తͱҐஔ͚ͮ  جຊ֓೦ͱؔ࿈ݚڀ  ߴूੵ8FCϗεςΟϯάج൫ͷηΩϡϦςΟͱӡ༻ٕज़Λߟྀ ͨ͠ΞΫηε੍ޚΞʔΩςΫνϟ  εϨου୯ҐͰߴ଎ʹݖݶ෼཭Λߦ͏8FCαʔόͷΞΫηε੍

    ޚΞʔΩςΫνϟ 
  4. ໨࣍ʢʣ  εΫϦϓτݴޠͰߴ଎͔ͭܰྔʹ֦ுՄೳͳ8FCαʔόͷػೳ ֦ுࢧԉΞʔΩςΫνϟ  ϦΫΤετ୯ҐͰίϯϐϡʔλϦιʔεΛ෼཭͢ΔϦιʔε੍ ޚΞʔΩςΫνϟ  ·ͱΊ 

  5. ୈষ ݚڀͷ໨తͱҐஔ͚ͮ

  6. ݚڀͷഎܠ wΫϥ΢υ΍֤छ8FCαʔϏεͷීٴͱݸਓͷར༻ w8FCαʔϏεͷ௿Ձ֨Խͱ඼࣭ͷڝ૪ wӡ༻ٕज़ͷݚڀͱγεςϜͷ҆ఆԽ͕՝୊ w8FCαʔόͷߴूੵϚϧνςφϯτํࣜʹ஫໨ wηΩϡϦςΟͱϗετͷऩ༰ޮ཰޲্͕ॏཁ 

  7. ݚڀͷ໨త wߴूੵϚϧνςφϯτํࣜͷ՝୊Λ੔ཧɾղܾ wಛʹςφϯτ಺ͷίϯςϯπΛࣄۀऀ͕؅ཧͰ͖ͳ͍৔߹  ߴूੵϚϧνςφϯτؒͰͷݖݶ෼཭ͷ՝୊ղܾ  ߴूੵϚϧνςφϯτํࣜͷػೳ֦ுͷ՝୊ղܾ  ߴूੵϚϧνςφϯτؒͰͷϦιʔε෼཭ͷ՝୊ղܾ 

  8. ݚڀͷҐஔ͚ͮ w8FCαʔόͷߴूੵϚϧνςφϯτํࣜʹ͓͍ͯίϯςϯ π੍͕ޚग़དྷͳ͍৔߹ͷෳ਺ͷ՝୊Λ੔ཧͯ͠ղܾ wߴूੵϚϧνςφϯτํࣜͷ8FCϗεςΟϯάʹண໨ wମܥతʹϚϧνςφϯτํࣜͷैདྷख๏ͷ՝୊Λ੔ཧ wੑೳɾηΩϡϦςΟɾϦιʔε੍ޚɾӡ༻ٕज़ͷ؍఺Ͱղܾ w044ͱͯ͠ӡ༻ʹ଱͑͏Δ࣮૷Λߦ͍෯޿͘ར༻ͯ͠௖͘ 

  9. ؔ࿈࿦จ wത࢜࿦จ w8FCαʔόͷߴूੵϚϧνςφϯτΞʔΩςΫνϟʹؔ͢Δݚڀ w IUUQTSFQPTJUPSZLVMJCLZPUPVBDKQETQBDFIBOEMF wαʔϕΠ࿦จ w8FCαʔόͷߴूੵϚϧνςφϯτΞʔΩςΫνϟͱӡ༻ٕज़ wIUUQTFBSDIJFJDFPSHCJOTVNNBSZQIQ JEKC@@DBUFHPSZMBOH+ZFBSBCTU

  10. ୈষ جຊ֓೦ͱؔ࿈ݚڀ

  11. ߴूੵϚϧνςφϯτํࣜͷ՝୊Λ੔ཧ جຊ֓೦ ӡ༻ٕज़ͱηΩϡϦςΟͱੑೳͷ՝୊ 8FCαʔόػೳ֦ுͷ՝୊ 8FCαʔόͷϦιʔε੍ޚͷ՝୊ 

  12. جຊ֓೦

  13. Ϛϧνςφϯτํࣜ

  14. 8FCαʔόͷϚϧνςφϯτํࣜ w୯Ұͷαʔόʹෳ਺ͷϢʔβ؀ڥΛߏங͢Δํࣜ wӡ༻ίετͱऩ༰ʢϋʔυ΢ΣΞʣίετΛ௿ݮՄೳ w8FCίϯςϯπΛ؅ཧՄೳͳ৔߹͸࠾༻͠΍͍͢ wࣄۀऀ͕ίϯςϯπΛ؅ཧͰ͖ͳ͍৔߹ӡ༻͕ࠔ೉ ߴूੵԽʹ൐͏ϗετؒͷϦιʔεڝ߹΍ੑೳͷ՝୊ 

  15. 8FCίϯςϯπͷ؅ཧͱϚϧνςφϯτ w8FCίϯςϯπΛࣄۀऀ͕؅ཧͰ͖Δ৔߹ 8FCίϯςϯπ͔ΒϦιʔε΍ݖݶͷ෼཭Λ૝ఆՄೳ w8FCίϯςϯπΛࣄۀऀ͕؅ཧͰ͖ͳ͍৔߹ ͋ΒΏΔίϯςϯπ͕ಈͨ͘Ίऩ༰ઃܭɾӡ༻͕ࠔ೉ ੬ऑͳίϯςϯπ͕͋ΔલఏͰϦιʔεɾݖݶ෼཭͕ඞཁ 

  16. 8FCϗεςΟϯάαʔϏε

  17. 8FCϗεςΟϯάαʔϏεͷಛ௃ wࣄۀऀ͸͓٬༷ͷ8FCίϯςϯπΛ੍ޚͰ͖ͳ͍ wϛυϧ΢ΣΞɾ04Ͱ੍ޚ͢Δඞཁ͕͋Δ wͰ͖Δ͚ͩฏ౳ʹϢʔβମݧΛఏڙ͢΂͖ wڞ༗ͷ৔߹͸Ϧιʔε੍ޚ΍ηΩϡϦςΟ͕ॏཁ wੑೳͱऩ༰਺Λ͍͔ʹόϥϯεΛͱΔ͔΋ॏཁ 

  18. ݸਓ޲͚ͷ8FCαʔϏεͷ૿Ճͱ௿Ձ֨Խ wֶੜ΍ओ්ͱ͍ͬͨݸਓ͕झຯͰ࢖͏༻్ͷ૿Ճ wϋʔυ΢ΣΞ΁ͷϗετऩ༰཰ͷ࠷େԽ͕ॏཁ wηΩϡϦςΟΛ୲อͭͭ͠ੑೳͱϋʔυ΢ΣΞϦιʔ εޮ཰Λ࠷େԽ͢ΔͨΊʹιϑτ΢ΣΞٕज़Λ׆༻ ➜ɹຊݚڀͷ໘ന͍ͱ͜Ζ 

  19. ϚϧνςφϯτํࣜͷΞʔΩςΫνϟ

  20. ϚϧνςφϯτํࣜͷΞʔΩςΫνϟ֓ཁ  ߴूੵϚϧνςφϯτํࣜ8FCαʔόͷΞʔΩςΫνϟ  ಈతίϯςϯπͷ࣮ߦํࣜ

  21. ߴूੵϚϧνςφϯτํࣜͷ 8FCαʔόͷΞʔΩςΫνϟ

  22. ϓϩηε਺ͱऩ༰ϗετ਺͕ॏཁ wϓϩηε਺͕ϗετ਺ʹґଘ͠ͳ͍ߏ੒ wෳ਺αΠτڞ༗ͷ8FCαʔόϓϩηε͕ϦΫΤετ ͞Εͨϗετ໊͔ΒಈతʹίϯςϯπΛݕग़ͯ͠ॲཧ ͢Δํ͕ࣜߴूੵϚϧνςφϯτʹ͸ඞཁ ྫɿ"QBDIFͷ7JSUVBM)PTUػೳ 

  23. 8FCαʔόͷجຊతͳϞσϧ 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF $IJMEIUUQEQSPDFTT PXOFSBQBDIF $IJMEIUUQEQSPDFTT PXOFSBQBDIF $MJFOU

    ϦΫΤετ Ϩεϙϯε 6/*9ܥ04ͷ৔߹ࣄલʹϦΫΤετΛड͚Δ ϓϩηεΛෳ਺GPSL ͯ͠ϓʔϧ͓ͯ͘͠ ʢ͜ΕΒશͯΛؚΊͯʮ୯Ұͷαʔόϓϩηεʯͱఆٛʣ  ϦΫΤετ Ϩεϙϯε ϦΫΤετ Ϩεϙϯε
  24. ߴूੵͷͨΊͷΞʔΩςΫνϟ IUUQE Ϣʔβ" IUUQE Ϣʔβ# IUUQE Ϣʔβ$ IUUQE Ϣʔβ" Ϣʔβ#

    Ϣʔβ$ ޮ཰ྑ͘࢒ϦιʔεΛ࢖͑Δ ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁͳϦιʔε ߴूੵ͕ཁٻ͞ΕΔ৔߹ͷ Ϛϧνςφϯτʢຊݚڀʣ ϚϧνςφϯτͷผΞϓϩʔν 
  25. ಈతίϯςϯπͷ࣮ߦํࣜ

  26. ಈతίϯςϯπͷ࣮ߦํࣜ  $(*ʢ$PNNPO(BUFXBZ*OUFSGBDFʣ࣮ߦํࣜ  %40ʢ%ZOBNJD4IBSFE0CKFDUʣ࣮ߦํࣜ 

  27. $(*࣮ߦํࣜ $(*QSPDFTT QIQDHJJOEFYQIQ $(*QSPDFTT GPSL UFSNJOBUFQSPDFTT FYFDWF 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT

    PXOFSBQBDIF ϦΫΤετຖʹϓϩηεͷੜ੒ɾഁغͱ ൺֱతେ͖ͳόΠφϦʢ1)1ͩͱQIQDHJόΠφϦʣͷ FYFDWF ͕ඞཁ 
  28. %40࣮ߦํࣜ 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF JOEFYQIQ QBSTF SVO  αʔόϓϩηεʹΠϯλϓϦλΛϥΠϒϥϦ

    ͱͯ͠௚઀૊ΈࠐΜͰ͓͘
  29. ಈతίϯςϯπͷ࣮ߦํࣜ w$(*࣮ߦํࣜ ΠϯλϓϦλͷෳ਺όʔδϣϯΛ࣮ߦͰ͖Δ w%40࣮ߦํࣜ ੑೳ͸ߴ͍͕جຊతʹ͸୯Ұͷ8FCαʔόʹΠϯλ ϓϦλΛෳ਺όʔδϣϯ࣋ͯͳ͍ 

  30. ߴूੵϚϧνςφϯτํࣜͷ՝୊ wߴूੵΛ࣮ݱ͢Δ"QBDIFͷ7JSUVBM)PTUػೳͷΑ͏ͳ ΞʔΩςΫνϟ͸Ϧιʔεޮ཰͕ྑ͍͕ෳ਺՝୊͕࢒Δ  ӡ༻ٕज़ͱηΩϡϦςΟͱੑೳͷ՝୊➜  8FCαʔόͷػೳ֦ுͱ՝୊➜  8FCαʔόͷϦιʔε੍ޚͱ՝୊➜

  31. ӡ༻ٕज़ͱηΩϡϦςΟͱੑೳͷ՝୊

  32. ӡ༻ٕज़ͱੑೳͷ՝୊ wϗετ୯ҐʹઃఆΛ௥Ճͯ͠؅ཧɾ੍ޚ͢Δӡ༻ wϗετͷ੩తઃఆʹΑΔϝϞϦͱಡࠐΈෛՙ૿େ ϖʔδςʔϒϧΤϯτϦ 15& ͷංେԽʹΑΓGPSL ͷ࣮ ߦॲཧ͕ඇৗʹ஗͍ ϓϩηεͷϦϩʔυ΋௕͔͔࣌ؒΔ৔߹΋༗Γ 

  33. ηΩϡϦςΟͱੑೳͷ՝୊ w$(*ํࣜͷΞΫηε੍ޚʹΑΔ੩తઃఆͷڧ੍ ϗετ୯ҐͰ੩తʹΦʔφ໊Λઃఆ͢Δඞཁ༗Γ ϗετ਺ʹґଘͨ͠ઃఆ਺ͱϝϞϦ࢖༻ྔͷ૿Ճ wैདྷͷ%40ͷΞΫηε੍ޚͰ͸$(*ํࣜҎԼͷੑೳ wϗετͷ্ҐσΟϨΫτϦͷγεςϜྖҬͷӾཡ 

  34. $(*QSPDFTT PXOFSVTFS $(*QSPDFTT PXOFSSPPU QIQDHJJOEFYQIQ PXOFSVTFS $(*QSPDFTT PXOFSVTFS ੩తʹઃఆ͞ΕͨVJEΛݩʹTFUVJE TFUHJE

    GPSL  FYFDWF TVFYFDQSPHSBN TFUVJESPPU UFSNJOBUFQSPDFTT FYFDWF 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF ˞$(* ैདྷͷΞΫηε੍ޚख๏ ϦΫΤετຖʹ$(*༻ϓϩηεͷ ੜ੒ഁغ͕ඞཁ
  35. 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSSPPU JOEFYQIQ PXOFSVTFS TFUVJE TFUHJE QBSTF SVO

    $IJMEIUUQEQSPDFTT PXOFSVTFS $IJMEIUUQEQSPDFTT PXOFSVTFS UFSNJOBUFQSPDFTT ϦΫΤετຖʹࢠIUUQEϓϩηεͷੜ੒ഁغ͕ඞཁ ˞%40 ैདྷͷΞΫηε੍ޚख๏
  36. ఏҊख๏

  37. ӡ༻ٕज़ͱηΩϡϦςΟΛղܾ wͭͷΞΫηε੍ޚΞʔΩςΫνϟΛఏҊ w$(*ํࣜͰηΩϡϦςΟͱӡ༻ٕज़Λཱ྆͢ΔΞΫ ηε੍ޚΞʔΩςΫνϟ➜ষ w%40ํࣜͰηΩϡϦςΟͱੑೳΛཱ྆͢ΔΞΫηε ੍ޚΞʔΩςΫνϟ➜ষ 

  38. 8FCαʔόͷػೳ֦ுͱ՝୊

  39. 8FCαʔϏεͷ҆ఆੑ޲্ͷ՝୊ wηΩϡϦςΟ΍Ϧιʔε؅ཧͷॏཁੑͷߴ·Γ wαʔϏεͷӡ༻ɾ؅ཧίετͷ௿ݮ͕ඞཁ wαʔϏεܗଶʹΑͬͯ8FCαʔόͷ࠷దԽ͕ඞཁ w8FCαʔόͷ֦ுػೳͷඞཁੑ͕૿Ճ 

  40. 8FCαʔόͷػೳ֦ு͕ॏཁ wϨεϙϯεੜ੒ॲཧલޙʹॲཧΛࠩ͠ࠐΉ w8FCίϯςϯπʹґଘ͠ͳ͍ޮ཰ͷྑ͍ΞΫηε੍ ޚ΍Ϧιʔε෼཭Λ࣮ݱՄೳ w8FCαʔϏεͷӡ༻ɾ؅ཧΛޮ཰ԽՄೳ w8FCαʔόͷઃఆ͚ͩͰ͸ղܾͰ͖ͳ͍՝୊ͷ૿Ճ 

  41. ैདྷͷ8FCαʔόͷػೳ֦ுख๏ w$ݴޠʹΑΔ࣮૷͕ఆ൪ ߴ଎͔ͭলϝϞϦ㱻อकੑ΍ੜ࢈ੑ͕௿͍ wεΫϦϓτݴޠʹΑΔ࣮૷ อकੑ΍ੜ࢈ੑ͕ߴ͍㱻௿ੑೳɾ҆શੑͷ໰୊ 

  42. ఏҊख๏

  43. εΫϦϓτͰߴ଎͔ͭ҆શʹ֦ுՄೳ w8FCαʔόϓϩηε΁ͷΠϯλϓϦλ૊ΈࠐΈΛ࠷దԽ wߴूੵϚϧνςφϯτํࣜͰ͸ӡ༻อकΛߟྀͨ͠ػೳ ֦ுΞʔΩςΫνϟ͕ॏཁͰ͋Δ wੑೳ໘ͱ҆શੑΛཱ྆ͨ͠ΞʔΩςΫνϟͷઃܭͱੜ ࢈ੑΛߴΊΔ࣮૷➜ষ 

  44. 8FCαʔόͷϦιʔε੍ޚͱ՝୊

  45. ैདྷͷ8FCαʔόͷϦιʔε੍ޚ wϋʔυ΢ΣΞϦιʔε΍ಉ࣌઀ଓ਺ͳͲΛ୯७ͳᮢ஋ ॲཧͰ੍ݶ wᮢ஋Λ௒͑ΔͱϦΫΤετॲཧΛڧ੍੾அɾڋ൱ wϦΫΤετΛड͚Δ͔ड͚ͳ͍͔ͷ୯७ͳ੍ޚ 

  46. ैདྷͷϦιʔε੍ޚͷ՝୊  αʔόͷෛՙΛ௿ݮ͢Δ͜ͱΛॏࢹ͢Δ͋·ΓϢʔβ ମݧΛେ͖͘ଛͳ͍ͬͯΔ  ࠷େಉ࣌઀ଓ਺ҎԼͰ΋ҰͭͷϦΫΤετͰେྔʹϦ ιʔεΛ࢖༻͢ΔίϯςϯπΛߟྀͰ͖͍ͯͳ͍  ੍ݶͷཻ౓͕ߥ͘ϗετؒͷϦιʔεڝ߹ʹΑΓշద ʹ࢖͑ΔϢʔβͱ࢖͑ͳ͍Ϣʔβͷ͕ࠩେ͖͍

    
  47. ఏҊख๏

  48. ϦΫΤετ୯ҐͰϦιʔεΛ෼཭ wϦΫΤετͷதஅͰ͸ͳ͘ܧଓతʹॲཧ͢Δख๏ wϦΫΤετ୯ҐͰϦΫΤετͷଐੑʹج͍ͯϦιʔε੍ޚ w؅ཧऀ͕ෳࡶͳઃఆΛϓϩάϥϚϒϧʹදݱՄೳ wಛఆͷίϯϐϡʔλϦιʔεൣғ಺Ͱॲཧ͢ΔΞʔΩς Ϋνϟ➜ষ 

  49. ୈষ ߴूੵ8FCϗεςΟϯάج൫ͷηΩϡϦςΟ ͱӡ༻ٕज़Λߟྀͨ͠ΞΫηε੍ޚΞʔΩςΫνϟ

  50. ষͷ՝୊ͷ·ͱΊ wಈతίϯςϯπ͸$(*ํࣜΛ࢖͏ඞཁ͕͋Δ ෳ਺όʔδϣϯͷΠϯλϓϦλΛѻ͍͍ͨ %40ํࣜͷΞΫηε੍ޚ͸$(*ఔ౓ͷੑೳʹͳΔ w੩తઃఆͷ૿ՃʹΑΔϝϞϦ࢖༻ྔͷ૿େ wγεςϜྖҬͷӾཡෆՄͷͨΊͷઃఆίετ͕ߴ͍ 

  51. ӡ༻໘ͱηΩϡϦςΟΛཱ྆͢ΔఏҊख๏ wϦΫΤετ͞ΕͨϑΝΠϧ͔ΒಈతʹPXOFSΛऔಘ ઃఆΛϗετͷ਺ʹ߹Θͤͯ૿΍͢ඞཁ͕ͳ͍ ϗετͷऩ༰਺ʹґଘͯ͠ϝϞϦ࢖༻ྔ͕૿େ͠ͳ͍ 15&͕ංେԽͤͣGPSL ͷ࣮ߦॲཧ͕஗͘ͳΒͳ͍ wϑΝΠϧͷPXOFSʹΑΔݖݶ෼཭ͷࡍʹϑΝΠϧγεςϜΛ ߹Θִͤͯ཭ 

  52. 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSSPPU JOEFYQIQ PXOFSVTFS TFUVJE TFUHJE QBSTF SVO

    ˞%40 ैདྷͷΞΫηε੍ޚख๏ $IJMEIUUQEQSPDFTT PXOFSVTFS $IJMEIUUQEQSPDFTT PXOFSVTFS UFSNJOBUFQSPDFTT ϦΫΤετຖͷࢠIUUQEϓϩηεͷੜ੒ഁغ͕ඞཁ
  53. $(*QSPDFTT PXOFSVTFS $(*QSPDFTT PXOFSSPPU QIQDHJJOEFYQIQ PXOFSVTFS $(*QSPDFTT PXOFSVTFS ੩తʹઃఆ͞ΕͨVJEΛݩʹTFUVJE TFUHJE

    GPSL  FYFDWF TVFYFDQSPHSBN TFUVJESPPU UFSNJOBUFQSPDFTT FYFDWF 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF ϦΫΤετຖʹ$(*༻ϓϩηεͷ ੜ੒ഁغ͕ඞཁ ˞$(* ैདྷͷΞΫηε੍ޚख๏ 
  54. $(*QSPDFTT PXOFSVTFS $(*QSPDFTT PXOFSSPPU QIQDHJJOEFYQIQ PXOFSVTFS $(*QSPDFTT PXOFSVTFS DISPPU 

    ϦΫΤετϑΝΠϧ͔ΒVJEऔಘޙ TFUVJE TFUHJE GPSL  FYFDWF TVFYFDQSPHSBN TFUVJESPPU UFSNJOBUFQSPDFTT FYFDWF 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF DISPPU&OWJSPONFOU ˞$(* ఏҊ͢ΔΞʔΩςΫνϟ 
  55. ੑೳධՁ w"QBDIFIUUQEʹରͯ͠ఏҊΞʔΩςΫνϟΛ࣮૷ wಉ࣌઀ଓ਺ΛมԽͤ͞ͳ͕ΒඵؒͷϨεϙϯε਺Λܭଌ w1)1ͰจࣈྻΛग़ྗ͢Δ͚ͩͷ$(*ϓϩάϥϜΛར༻ wैདྷख๏ͱఏҊख๏ͷੑೳΛධՁ 

  56. ࣮ݧ؀ڥ 

  57. 

  58. ̏ষ·ͱΊ wӡ༻ٕज़ͱηΩϡϦςΟΛߟྀͨ͠$(*ͷ৽͍͠ΞʔΩςΫνϟΛఏҊ wैདྷͷΞʔΩςΫνϟͱಉ౳ͷੑೳͰΑΓηΩϡΞͰѻ͍΍͍͢࢓༷  ߴूੵ࣌ʹ͓͍ͯ΋ઃఆ਺ʹԠͨ͡ϝϞϦ૿Ճ͕ੜ͡ͳ͍ͨΊ࣮ӡ༻ ্͸ߴ଎ʹಈ࡞Մೳ  DISPPU͢ΔͨΊͷϢʔβ؀ڥͷߏங͸ผ్Ϣʔβຖʹඞཁ wߴूੵϚϧνςφϯτͷςφϯτ਺૿ՃΛߟྀͨ͠ΞʔΩςΫνϟ 

  59. ୈষ εϨου୯ҐͰߴ଎ʹݖݶ෼཭Λߦ͏ WebαʔόͷΞΫηε੍ޚΞʔΩςΫνϟ

  60. ষͷ՝୊ͷ·ͱΊ wষͷΞΫηε੍ޚΞʔΩςΫνϟ͸ӡ༻ੑʹண໨ $(*ͷར఺ʢෳ਺όʔδϣϯͷఏڙʣΛߟྀ w%40൛ͷੑೳΛ׆͔͢ΞΫηε੍ޚख๏͕ແ͍ w࣮ߦํࣜ΍ΠϯλϓϦλ͕ಠࣗʹΞΫηε੍ޚख๏Λ ࣮૷͓ͯ͠Γ൥ࡶ 

  61. ߴूੵϚϧνςφϯτͱ$(*ɾ%40ͷੑೳ wੑೳ໘ʹ͓͍ͯ$(*͸ຊདྷద͍ͯ͠ͳ͍  ऩ༰਺͕૿͑ΔͱϓϩηεͷϝϞϦ࢖༻ྔ͕૿͑GPSL ͷޮ཰௿Լ  ͦ΋ͦ΋ϦΫΤετ୯ҐͰGPSL ͢ΔͷͰ஗͍ w%40͸ຊདྷGPSL Λ࣮ߦ͠ͳ͍ͨΊߴ଎ʹಈ࡞͢Δ͕

     ैདྷͷ%40ͷΞΫηε੍ޚ͸ϦΫΤετຖʹGPSL Λ࣮ߦ͢Δ 
  62. 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSSPPU JOEFYQIQ PXOFSVTFS TFUVJE TFUHJE QBSTF SVO

    ˞%40 ैདྷͷΞΫηε੍ޚख๏ $IJMEIUUQEQSPDFTT PXOFSVTFS $IJMEIUUQEQSPDFTT PXOFSVTFS UFSNJOBUFQSPDFTT ϦΫΤετຖͷࢠIUUQEϓϩηεͷੜ੒ഁغ͕ඞཁ 
  63. ఏҊ͢ΔΞΫηε੍ޚΞʔΩςΫνϟ w%40ํࣜͷੑೳΛ׆͔͢ΞʔΩςΫνϟ wಈతίϯςϯπ࣮ߦ௚લʹΦʔφมߋͷಛݖͷΈΛ༩ ੍͑ͨޚ༻ͷεϨουΛ࡞੒ wΦʔφΛมߋͨ͠εϨου্ͰίϯςϯπΛॲཧ wίϯςϯπ࣮ߦޙ͸εϨουͷΈΛ࡟আ 

  64. -JOVYεϨουͱ-JOVY$BQBCJMJUJFT w-JOVY,FSOFMҎ߱ͷಠࣗͷηΩϡϦςΟϞσϧ wSPPUಛݖΛࡉ෼Խͯ͠εϨου୯ҐͰ෇༩Մೳ wΦʔφʔͷมߋɾXFMMLOPXOQPSUͷMJTUFO౳໿ݸ w-JOVYલఏͰ͋Ε͹ఏҊख๏͕࣮ݱՄೳ 

  65. 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF UISFBE PXOFSVTFS UISFBE PXOFSBQBDIF JOEFYQIQ PXOFSVTFS

    TFUVJE TFUHJE ʜ VOTFUDBQT DSFBUFUISFBE TFUDBQT EFTUSPZUISFBE QBSTF SVO QSDUM TFUVJETFUHJEDBQT UISFBE PXOFSVTFS ˞%40 ఏҊ͢ΔΞΫηε੍ޚΞʔΩςΫνϟ 
  66. 1BSFOUIUUQEQSPDFTT PXOFSSPPU $IJMEIUUQEQSPDFTT PXOFSBQBDIF UISFBE PXOFSVTFS UISFBE PXOFSBQBDIF TFUVJE TFUHJE

    ʜ VOTFUDBQT DSFBUFUISFBE TFUDBQT EFTUSPZUISFBE QSDUM TFUVJETFUHJEDBQT UISFBE PXOFSVTFS ˞$(* ఏҊ͢ΔΞΫηε੍ޚΞʔΩςΫνϟ $(*QSPDFTT PXOFSVTFS QIQDHJJOEFYQIQ PXOFSVTFS $(*QSPDFTT PXOFSVTFS GPSL UFSNJOBUFQSPDFTT FYFDWF 
  67. 8FCαʔόϞσϧͱ੍ޚ༻εϨουͷߟ࡯ wϦΫΤετϓϩηε઎༗͢ΔαʔόϞσϧલఏ w%40͸εϨουͷ༗ແʹؔΘΒͣαʔόϓϩηεʹ ૊Έࠐ·ΕͨΠϯλϓϦλ͕௚઀ϓϩάϥϜΛ࣮ߦ wεϨουΛҰ࣌తʹ࡞Δ͜ͱʹΑΔηΩϡϦςΟϨϕ ϧͷ௿Լ͸ੜ͡ͳ͍

  68. -JOVYͰ"QBDIFϞδϡʔϧͱ࣮ͯ͠૷ wNPE@QSPDFTT@TFDVSJUZϞδϡʔϧ wઃఆ͸ҎԼͷΑ͏ʹγϯϓϧ 

  69. ੑೳධՁ w"QBDIFIUUQEʹରͯ͠ఏҊΞʔΩςΫνϟΛ࣮૷ wඵؒͷϦΫΤετ਺ΛมԽͤ͞Ϩεϙϯε਺Λܭଌ wQIQJOGP Λग़ྗ͢Δ͚ͩͷ؆୯ͳϓϩάϥϜΛ༻ҙ wैདྷख๏ͱఏҊख๏ͷੑೳΛධՁ 

  70. ࣮ݧ؀ڥ 

  71. %40࣮ߦํࣜͷΞΫηε੍ޚੑೳൺֱ w ඵؒϦΫΤετ਺Λ૿Ճͤ͞ͳ͕Βඵ ؒϨεϙϯε਺Λܭଌ w ྘ͷैདྷͷΞΫηε੍ޚ͸΄ͱΜͲੑ ೳ͕Ͱ͍ͯͳ͍ w ੺ͷఏҊ͢ΔΞΫηε੍ޚ͸ΞΫηε ੍ޚແ͠ͷ৔߹ͱൺ΂ͯ΋΄ͱΜͲΦʔ

    όʔϔου͸ແ͠ ੨ɿΞΫηε੍ޚແ͠ ੺ɿఏҊ͢ΔΞΫηε੍ޚ ྘ɿैདྷͷΞΫηε੍ޚ 
  72. $(*࣮ߦํࣜͷΞΫηε੍ޚੑೳൺֱ w ඵؒϦΫΤετ਺Λ૿Ճͤ͞ͳ͕ΒඵؒϨ εϙϯε਺Λܭଌ w $(*ͷΞΫηε੍ޚͷ༗ແʹؔΘΒͣ$(* ͷ࣮ߦํࣜͷΦʔόʔϔου͕େ͖͍ͨΊɺ ΞΫηε੍ޚʹΑΔΦʔόʔϔου͸ແ͍ w ষͷ$(*ͷΞΫηε੍ޚ͸TVFYFDͱಉ

    ౳ͷੑೳͰ͋Δ͜ͱ͕ষͰ࣮ݧࡁΈ ੨ɿΞΫηε੍ޚແ͠ ੺ɿैདྷͷΞΫηε੍ޚ ྘ɿఏҊ͢ΔΞΫηε੍ޚ 
  73. ࢀߟɿγεςϜίʔϧͷ਺Λൺֱ wQIQJOGP ΁ͷΞΫηεΛTUSBDF͔Βղੳ w$(*ʴTV&9&$ճ wNPE@QIQ NPE@QSPDFTT@TFDVSJUZճ wΦʔόʔϔουʹͳͬͯΔγεςϜίʔϧ wDMPOF PQFO DMPTF

    FYFDWF ͳͲTV&9&$ؔ࿈ ˞TUSBDFDGQ1*% ˞DBUDHJMPHcHSFQWFQPMM@XBJUcHSFQWGVUFYcQFSMBOF <aEa> QSJOU@JG 
  74. ࢀߟɿಋೖલޙͷ$16࢖༻ྔൺֱ Ұ೔ͷΞΫηε਺͸ͲͪΒͷαʔό΋໿ສʢαʔϏεશମͰ͸਺ेԯʣ $(*ʴTV&9&$ %40ʴNPE@QSPDFTT@TFDVSJUZ ˙TZTUFN ˙VTFS ˙JEMF 

  75. ষ·ͱΊ wߴूੵϚϧνςφϯτํࣜʹ͓͚ΔੑೳΛߟྀͨ͠Ξ Ϋηε੍ޚΞʔΩςΫνϟͷఏҊ w%40࣮ߦํࣜͷΞΫηε੍ޚͱͯ͠େ෯ʹੑೳվળ wఏҊख๏͸$(*࣮ߦํࣜʹ΋ద༻Մೳ 

  76. ষͷ$(*ͷΞΫηε੍ޚͱͷҧ͍ wষͷΞΫηε੍ޚ͸҆શʹDISPPUͰ͖ͳ͍ wεϨου্ͰDISPPU͢ΔͱಉҰϓϩηε্ʹଐ͢Δ શͯͷεϨου͕DISPPU͞ΕΔ wεϨουΛੜ੒ͨ͠ϓϩηεࣗମ΋DISPPU͞ΕΔͨ Ί৔߹ʹΑͬͯ͸ҙਤ͠ͳ͍ಈ࡞Λ͢ΔՄೳੑ͕͋Δ

  77. $(*ํࣜͷΞΫηε੍ޚͷ࢖͍෼͚ wDISPPUʹΑΔִ཭·Ͱߦ͍͍ͨ৔߹➜ষ wಉҰͷΞΫηε੍ޚͰ౷Ұతʹ෼཭͍ͨ͠৔߹➜ষ wੑೳ͸ಉఔ౓

  78. ୈষ εΫϦϓτݴޠͰߴ଎͔ͭܰྔʹ֦ுՄೳͳ 8FCαʔόͷػೳ֦ுࢧԉΞʔΩςΫνϟ

  79. ষͷ՝୊ͷ·ͱΊ w8FCαʔόͷػೳ֦ுʹ͓͍ͯੑೳΛߟྀͨ͠৔߹ ͸$ݴޠʹΑΔ࣮૷͕ఆ൪ wैདྷͷ8FCαʔόͷεΫϦϓτݴޠʹΑΔ֦ு͸ੑ ೳ໘ͱ҆શੑʹ՝୊ wαʔόϓϩηε΁ͷΠϯλϓϦλ૊ΈࠐΈͷΞʔΩς ΫνϟͷఏҊ͕ॏཁ 

  80. ैདྷͷεΫϦϓτʹΑΔػೳ֦ுํࣜʢ̍ʣ wΠϯλϓϦλڞ༗ํࣜʢNPE@QFSMɺNPE@SVCZʣ αʔόϓϩηεىಈ࣌ʹ୯ҰͷΠϯλϓϦλ֬อ ϦΫΤετॲཧ࣌ʹෳ਺ͷεΫϦϓτͰΠϯλϓϦλڞ༗ άϩʔόϧͷঢ়ଶ΋ڞ༗ ߴػೳ͔ͭن໛ͷେ͖͍ΠϯλϓϦλʹ࠷ద 

  81. ैདྷͷεΫϦϓτʹΑΔػೳ֦ுํࣜʢ̎ʣ wෳ਺ΠϯλϓϦλํࣜʢNPE@MVBʣ  εΫϦϓτ࣮ߦʢϦΫΤετॲཧʣ୯ҐͰΠϯλϓϦλ֬อ  άϩʔόϧͳঢ়ଶ͸ಠཱͰ҆શ  ΠϯλϓϦλ͕֬อ͢Δঢ়ଶ΋౎౓։์ͯ͠লϝϞϦ ௿ػೳͰߴ଎ɾলϝϞϦͳ૊ΈࠐΈεΫϦϓτݴޠͳͲʹ࠷ద 

  82. ैདྷख๏ͷ՝୊ wΠϯλϓϦλڞ༗ํࣜͷ՝୊ άϩʔόϧঢ়ଶ͕ෳ਺εΫϦϓτͰׯব ࣮ߦ࣌ͷόΠτίʔυ૿ՃʹΑΔϝϞϦͷ૿Ճ wෳ਺ΠϯλϓϦλํࣜͷ՝୊ ϦΫΤετຖͷΠϯλϓϦλ֬อɾ։์ͷίετ͕ߴ͍ 

  83. VM •  •  •  

  84. ఏҊ͢ΔΞʔΩςΫνϟ wੑೳ͕ཁٻ͞ΕΔՕॴ͸ΠϯλϓϦλڞ༗ wੑೳ͕ཁٻ͞Εͳ͍Օॴ͸ݸผʹΠϯλϓϦλ֬อ wϝϞϦ૿ՃͷݪҼͰ͋ΔόΠτίʔυͷΈΛ։์ w҆શੑͷ໘Ͱάϩʔόϧͷঢ়ଶͷΈΛ։์Մೳ wόΠτίʔυΩϟογϡʹΑΔߴ଎Խ΋Մೳ 

  85. ਌αʔόϓϩηε ࢠαʔόϓϩηε" ϦΫΤετॲཧ༻ΠϯλϓϦλ ىಈ࣌ॲཧ༻ΠϯλϓϦλ ϦΫΤετҎ֎ͷॲཧ༻ΠϯλϓϦλ εΫϦϓτ εΫϦϓτ εΫϦϓτ εΫϦϓτ εΫϦϓτ

    ੑೳ͕ཁٻ͞ΕΔϑοΫ ͸ΠϯλϓϦλΛڞ༗ ɾ ɾ ɾ  
  86. w αʔόϓϩηεىಈ࣌ʹΠϯλϓ ϦλΛ֬อ w ϦΫΤετॲཧ࣌ʹΠϯλϓϦλ Λڞ༗ͯ͠εΫϦϓτΛίϯύΠϧ ͔ͯ͠Β࣮ߦ ߏจ໦ղੳ όΠτίʔυੜ੒ 7.্Ͱ࣮ߦ

    ϦΫΤετຖʹαʔόϓϩηε͕εΫϦϓτΛϑοΫ εΫϦϓτಡΈࠐΈ ΠϯλϓϦλͱ ϥΠϒϥϦΛڞ༗ όΠτίʔυɺάϩʔόϧม਺ɾΫϥεɺྫ֎ϑϥάΛ։์ ഉଞॲཧ ϚϧνεϨου8FC αʔόΞʔΩςΫνϟ ʹରԠ 
  87. ߏจ໦ղੳ όΠτίʔυੜ੒ 7.্Ͱ࣮ߦ ϦΫΤετຖʹαʔόϓϩηε͕εΫϦϓτΛϑοΫ εΫϦϓτಡΈࠐΈ ΠϯλϓϦλͱ ϥΠϒϥϦΛڞ༗ άϩʔόϧม਺ɾΫϥεɺྫ֎ϑϥάΛ։์ όΠτίʔυ ςʔϒϧ

    w όΠτίʔυΩϟογϡʹΑͬͯαʔ όϓϩηεىಈޙʹίʔυมߋ͕ඞ ཁͳ͍৔߹͸ߴ଎Խ w αʔόىಈ࣌ʹίϯύΠϧͯ͠όΠ τίʔυςʔϒϧʹอଘ͓͖ͯ͠ɺ ϦΫΤετ࣌ʹऔಘ࣮ͯ͠ߦ 
  88. ΞʔΩςΫνϟͷ࣮૷ w"QBDIFϞδϡʔϧͷNPE@NSVCZͱ࣮ͯ͠૷ wOHJOYϞδϡʔϧͷOHY@NSVCZͱͯ͠΋࣮૷ wNSVCZͱ͍͏ܰྔ3VCZΠϯλϓϦλΛར༻ w3VCZͰ8FCαʔόͷৼΔ෣͍Λ֦ுՄೳ wదࡐదॴͱͯ͠ैདྷͷ$ݴޠͷ࣮૷ͱڞଘՄೳ 

  89. NPE@NSVCZͷػೳ֦ுͷ֓ཁਤ 

  90. NPE@NSVCZઃఆྫ # Normal hook <Location /mruby-test> mrubyHandlerMiddle /path/to/test.rb </Location> #

    ByteCode Caching at Start up <Location /mruby-test-cache> mrubyHandlerMiddle /path/to/test.rb cache </Location> 
  91. NPE@NSVCZઃఆྫ # Normal hook <Location /mruby-test> mrubyHandlerMiddle /path/to/test.rb </Location> #

    ByteCode Caching at Start up <Location /mruby-test-cache> mrubyHandlerMiddle /path/to/test.rb cache </Location> 
  92. OHY@NSVCZͷΠϯϥΠϯઃఆྫ # Inline code hook location /mruby-hello { mruby_content_handler_code ‘

    r = Nginx::Request.new c = Nginx::Connection.new r.content_type = “text/plain” Nginx.echo “Hello #{c.remote_ip} World” ‘; } 
  93. NPE@NSVCZͰͷ3FWFSTF1SPYZ # mrubyTranslateNameFirst “/path/to/proxy.rb” backends = [ "http://192.168.0.101:8888/", "http://192.168.0.102:8888/", "http://192.168.0.103:8888/",

    ] r = Apache::Request.new backend = backends[rand(backends.length)] r.reverse_proxy backend + r.unparsed_uri 
  94. OHY@NSVCZͰͷ3FWFSTF1SPYZ # location /proxy { # mruby_set $backend "/path/to/proxy.rb"; #

    proxy_pass http://$backend; # } backends = [ "http://192.168.0.101:8888/", "http://192.168.0.102:8888/", "http://192.168.0.103:8888/", ] backends[rand(backends.length)] 
  95. NPE@NSVCZͷ#BTJD"VUIXJUI3FEJT # <Location /basic/> # AuthType basic # AuthName "Message

    for clients" # AuthBasicProvider mruby # mrubyAuthnCheckPassword /path/to/authn_basic.rb # require valid-user # </Location> anp = Apache::AuthnProvider.new redis = Redis.new "127.0.0.1”, 6379 if redis.get(anp.user) == anp.password Apache.return Apache::AuthnProvider::AUTH_GRANTED else Apache.return Apache::AuthnProvider::AUTH_DENIED end 
  96. ҟͳΔ8FCαʔόͷ౷Ұత֦ுهड़ "QBDIF "1* 3VCZTDSJQU NPE@NSVCZ 3VCZTDSJQU ɾ ɾ ɾ ɾ

     3VCZTDSJQUO /HJOY "1* OHY@NSVCZ 3VCZTDSJQU "QBDIF $PSF /HJOY $PSF 3VCZ %4- GPS8FC "QBDIF 5SB⒏D 4FSWFS "1* UT@NSVCZ "QBDIF 5SB⒏D 4FSWFS $PSF SFGIUUQTHJUIVCDPNTZVDSFBNUT@NSVCZ 
  97. ౷Ұతهड़ྫ # Output Hello World Server = get_server_calss Server.rputs "Hello

    #{Server.module_name}/ #{Server.module_version} world!" # mod_mruby => "Hello mod_mruby/1.9.3 world!" # ngx_mruby => "Hello ngx_mruby/1.3.2 world!" # ts_mruby => "Hello ts_mruby/0.0.1 world!" 
  98. ࣮ݧ wੑೳධՁ )FMMP8PSMEग़ྗͷ୯७ͳϓϩάϥϜʢΠϯλϓϦλͷੑೳͰ ͸ͳ͘૊ΈࠐΈΞʔΩςΫνϟͷੑೳΛ࠷େԽ͢ΔͨΊʣ ैདྷɾఏҊख๏Ͱ࣮ߦ͠ඵؒͷϨεϙϯε਺Λܭଌ ಉ࣌઀ଓ਺ɾ૯઀ଓ਺ສ 

  99. ࣮ݧ؀ڥ 

  100. ैདྷख๏ͱͷੑೳൺֱ ैདྷͷػೳ֦ ு NPE@QFSM NPE@SVCZ NPE@MVB NPE@NSVCZ NPE@NSVCZ Ωϟογϡ ݴޠ

    $ 1FSM 3VCZ -VB NSVCZ NSVCZ ΠϯλϓϦλ ॳظԽॲཧ ࣄલ ౎౓ ࣄલ ࣄલ ϥΠϒϥϦ ಡΈࠐΈ ࣄલ ౎౓ ࣄલ ࣄલ ίϯύΠϧ ࣄલ ౎౓ ౎౓ ౎౓ ࣄલ ίʔυͷมߋ ෆՄ Մ Մ Մ ෆՄ άϩʔόϧঢ়ଶ ڞ༗ ڞ༗ ඇڞ༗ ඇڞ༗ ඇڞ༗ ੑೳ 3FTQPOTFTFD       
  101. ੈքதͷ8FCϑϨʔϜϫʔΫͷ଎౓Λڝ͏ίϯςετ$ɺ$ ɺ+BWBɺ(P౳ͷத 3VCZͰؤு͍ͬͯΔҐ SFGIUUQTXXXUFDIFNQPXFSDPNCFODINBSLT 

  102. ݴޠΛ3VCZʹݶఆͨ݁͠Ռ ѹ౗తҐ SFGIUUQTXXXUFDIFNQPXFSDPNCFODINBSLT 

  103. ষͷ·ͱΊ wεΫϦϓτݴޠͰߴ଎͔ͭ҆શʹಈ࡞͢Δ8FCαʔόػೳ֦ ுࢧԉΞʔΩςΫνϟΛఏҊ wैདྷݚڀΑΓ΋ߴ଎Ͱ8FCαʔό׆༻έʔεͰ͸$ݴޠͰͷ࣮ ૷ʹḮ৭ͳ͍ΞʔΩςΫνϟΛ࣮ݱ w޿͘࢖ΘΕ͍ͯΔ8FCαʔόιϑτ΢ΣΞͷϞδϡʔϧͱͯ͠ ࣮૷͠Φʔϓϯιʔειϑτ΢ΣΞͱͯ͠ެ։ 

  104. ষͷࠓޙͷ՝୊ wάϩʔόϧม਺ྖҬͷࣗಈ։์ػೳ wݱࡏ͸खಈ։์Ͱ͋Δ͕ಛఆͷάϩʔόϧม਺Ҏ֎ ͸ࣗಈͰ։์Ͱ͖ΔॲཧʢઃఆͰ੾Γସ͑ՄೳʣΛ ௥Ճ༧ఆ

  105. ୈষ ϦΫΤετ୯ҐͰίϯϐϡʔλϦιʔεΛ ෼཭͢ΔWebαʔόͷ Ϧιʔε੍ޚΞʔΩςΫνϟ

  106. ষͷ՝୊ͷ·ͱΊ   αʔόͷෛՙΛ௿ݮ͢Δ͜ͱΛॏࢹ͢Δ͋·ΓϢʔβ ମݧΛେ͖͘ଛͳ͍ͬͯΔ  ࠷େಉ࣌઀ଓ਺ҎԼͰ΋ҰͭͷϦΫΤετͰେྔʹϦ ιʔεΛ࢖༻͢ΔίϯςϯπΛߟྀͰ͖͍ͯͳ͍  ੍ݶͷཻ౓͕ߥ͘ϗετؒͷϦιʔεڝ߹ʹΑΓշద

    ʹ࢖͑ΔϢʔβͱ࢖͑ͳ͍Ϣʔβͷ͕ࠩେ͖͍
  107. ࣮ݱ͍ͨ͠Ϧιʔε੍ޚʢ̍ʣ 8FCαʔό 8FCαʔό Ϛϧνςφϯτํࣜͷαʔόશମͷ$16Ϧιʔε͕ṧഭͨ͠ঢ়ଶʹ͓͍ͯɺ ࢖༻Ͱ͖Δ$16Ϧιʔε͸ʹ੍ݶ͞ΕΔ͕ɺར༻Ͱ͖ΔΫϥΠΞϯτ਺͸ഒ ΞΫηεෆՄ ΞΫηεՄʂ ΞΫηεՄ  $16ˋ࢖༻͢Δ

    ͭͷϓϩάϥϜΛॲཧ $16ˋ࢖༻͢Δ ͭͷϓϩάϥϜΛॲཧ ఏҊख๏ ैདྷख๏ ΑΓཻ౓ͷ ࡉ੍͔͍ݶ
  108. ࣮ݱ͍ͨ͠Ϧιʔε੍ޚʢ̎ʣ wϦΫΤετʹؚ·ΕΔ༷ʑͳଐੑΛݩʹ੍ޚ͍ͨ͠ ߴूੵϚϧνςφϯτํࣜͰ͸ϦΫΤετͷଐੑͰ ϗετΛ۠ผ͠ϓϩηεΛڞ༗͢ΔͨΊ ϦΫΤετ୯ҐͰͷϦιʔε෼཭͕ඞཁ wෳࡶͳઃఆΛϓϩάϥϚϒϧʹهड़Մೳʹ͍ͨ͠ 

  109. ఏҊ͢ΔϦιʔε੍ޚΞʔΩςΫνϟ w04ͷϓϩηεϦιʔε෼཭ٕज़Λ8FCαʔόͷϦΫ Τετ୯ҐͰ׆༻੍͠ޚ wষͷػೳ֦ுࢧԉػߏNPE@NSVCZΛԠ༻ ϓϩάϥϚϒϧͰΦʔόʔϔουগͳ͍ࢧԉػߏͰ ϦΫΤετ୯ҐʹϦιʔεΛ੍ޚՄೳ 

  110. -JOVYಠࣗͷϦιʔε੍ޚDHSPVQ wϓϩηε୯ҐͰ$16ɾϝϞϦɾ*0౳Λ੍ޚ -JOVY,FSOFMҎ߱ͷػೳ ಛఆͷϓϩηε͸ίΞ$16·Ͱׂ౰ͳͲ $16ΛׂΓ౰ͯͨϦιʔεάϧʔϓΛ࡞੒ άϧʔϓʹࢀՃ͍ͯ͠ΔϓϩηεͰϦιʔε෼഑ 

  111. ϦΫΤετ୯ҐͰͷϦιʔε੍ޚ 8FCαʔό ϓϩηε ΫϥΠΞϯτ ϦΫΤετ Ϩεϙϯε Ϩεϙϯεੜ੒ͷॲཧͷؒͷΈ ϓϩηεΛಛఆͷDHSPVQʹΞλον ʢ$16ͳͲʣ DHSPVQΞλον

    DHSPVQσλον 
  112. NPE@NSVCZͱDHSPVQͷ࣮૷ "QBDIF1SPDFTT NPE@NSVCZ NSVCZ MJCNSVCZB  NSVCZDHSPVQ MJCDHSPVQ -JOVYDHSPVQT • 

    ֤ػೳ͸୯ମͰಈ࡞Մೳʢૄ݁߹ʣ •  NPE@NSVCZ͸"QBDIFΛNSVCZͰ੍ޚ •  NSVCZDHSPVQ͸MJCDHSPVQΛNSVCZͰ੍ޚ •  NSVCZ NSVCZDHSPVQ •  3VCZ΍$ίʔυ಺ͰϦιʔεΛ੍ޚՄೳ •  ͜ͷϧʔϓ͸$16Ͱ •  ͜ͷॻ͖ग़͠͸%*4,ॻࠐ.#TFDͰ 
  113. "QBDIFͱNPE@NSVCZʹΑΔ࣮૷֓ཁ 

  114. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.filename == “/path/to/cpu.cgi” cpu =

    Cgroup::CPU.new “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end  ݫີʹ͸NTதNTͷ$16࢖༻࣌ؒΛ RVPUBͱͯ͠εέδϡʔϧ͢Δઃఆ
  115. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.hostname == “example.com” cpu =

    Cgroup::CPU.new “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  116. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.user== “matsumotory” cpu = Cgroup::CPU.new

    “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  117. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.method== “POST” cpu = Cgroup::CPU.new

    “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  118. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.finfo.user == 500 cpu =

    Cgroup::CPU.new “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  119. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.finfo.group == 300 cpu =

    Cgroup::CPU.new “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  120. Ϧιʔε੍ޚͷઃఆྫ r = Apache::Request.new if r.finfo.size > 3000 cpu =

    Cgroup::CPU.new “cpu_group” # CPU 10 cpu.cfs_quota_us = 10000 cpu.create cpu.attach end 
  121. Ϧιʔε੍ޚͷઃఆྫ if resource.most_heavy_hosts.include? r.hostname # 1 100 1 c =

    Cgroup::CPU.new "httpd-static-limited" c.cfs_quota_us = 100000 Apache::Resource.attach_cgroup c, "httpd-static-limited" elsif resource.heavy_hosts.include? r.hostname # CPU 25% 24 6 # httpd 100 ( ) c = Cgroup::CPU.new "httpd-limited" c.shares = 25 Apache::Resource.attach_cgroup c, "httpd-limited" else # CPU 75% 24 18 # httpd-limited 100 ( ) c = Cgroup::CPU.new "httpd" c.shares = 75 Apache::Resource.attach_cgroup c, "httpd" end 
  122. ਫ਼౓ͱΦʔόʔϔουͷධՁ wϦιʔε੍ޚಋೖʹΑΔΦʔόʔϔουධՁ wϦιʔε੍ޚͷਫ਼౓ධՁ 

  123. ࣮ݧ؀ڥ 

  124. ΦʔόʔϔουͷධՁ w)FMMP8PSME͢Δ͚ͩͷ)5.-ϑΝΠϧ wϦιʔε੍ޚಋೖ੍͠ݶΛ͠ͳ͍৔߹ͷΦʔόʔϔου wಉ࣌઀ଓ਺ɾ૯઀ଓ਺ສϦΫΤετ ະಋೖ࣌ɿSFTQPOTFTFD ɹಋೖ࣌ɿSFTQPOTFTFD 

  125. Ϧιʔε੍ޚͷਫ਼౓ධՁ w$16࢖༻͢Δ$(*΁ϦΫΤετ w$16ʹϦιʔε੍ޚ w$(*ͷ$16࢖༻࣌ؒΛมߋͯ͠ਫ਼౓Λൺֱ wੑೳ੍ޚ཰Λఆٛɿ wϨεϙϯε࣌ؒʢ੍ݶແ͠ʣϨεϙϯε࣌ؒʢ੍ݶ༗Γʣ wੑೳ੍ޚ཰͕ʹ͚ۙΕ͹ਖ਼੍͘͠ޚ͞Ε͍ͯΔ 

  126. 

  127. ষͷ·ͱΊ wϦΫΤετ୯ҐͰίϯϐϡʔλϦιʔεΛ෼཭ wϚϧνςφϯτํࣜͷΑ͏ʹϦΫΤετͰςφϯτΛಛ ఆ͠ॲཧ͢Δϓϩηε͸ڞ༗͢ΔΞʔΩςΫνϟʹ༗༻ wߴूੵϚϧνςφϯτํࣜʹ͓͍ͯैདྷݚڀΑΓ΋ཻ౓ ͷࡉ͔͍Ϧιʔε੍ݶΛద༻Ͱ͖Δ 

  128. ୈষ ·ͱΊ

  129. ·ͱΊ w8FCαʔόͷߴूੵϚϧνςφϯτํࣜʹؔ͢Δݚڀ ষͰηΩϡϦςΟͱӡ༻໘Λཱ྆ͨ͠ΞΫηε੍ޚͷݚڀ ষͰੑೳͱηΩϡϦςΟΛཱ྆ͨ͠ΞΫηε੍ޚͷݚڀ ষͰ8FCαʔόػೳ֦ுࢧԉػߏͷݚڀ ষͰ8FCαʔόͷϦιʔε੍ޚͷݚڀ 

  130. ߩݙ w8FCαʔόͷߴूੵϚϧνςφϯτํࣜͷجຊ֓೦ͱ՝୊ Λମܥతʹ੔ཧ͠ΞʔΩςΫνϟΛఏҊͯ͠ղܾ ηΩϡϦςΟɾੑೳɾϦιʔε੍ޚɾӡ༻ٕज़ͷ؍఺ wಛʹ8FCϗεςΟϯάαʔϏεΛର৅ʹΞʔΩςΫνϟͷ ࣮૷Λߦͬͯ044ͱͯ͠ެ։͠αʔϏε΁൓өɾվળ -JOVYΛ׆༻֤ͨ͠छ8FCαʔϏεͷߴ౓Խʹد༩ 

  131. 044ͱͯ͠ެ։ wୈষNPE@QSPDFTT@TFDVSJUZ wୈষNPE@NSVCZOHY@NSVCZͱ֤छNSVCZϞδϡʔϧ wୈষNSVCZDHSPVQ wੈքத͔Β֤छࣄྫΛ࿈བྷ௖͍͓ͯΓ·͢ 

  132. ࠓޙͷల๬ wςφϯτ୯ҐͰαʔόϓϩηεΛىಈͤͭͭ͞ߴूੵ ΋ཱ྆͢ΔΞʔΩςΫνϟͷઃܭͱ࣮૷ wϦΫΤετॲཧ࣌ͷΈϓϩηε͕.PSUBMʹىಈ͢Δ w߃ৗੑͷ͋Δ8FCαʔϏεج൫ͷ࣮ݱ wϝʔϧͷΑ͏ͳͦͷଞͷϓϩτίϧʹԠ༻Մೳ

  133. ຊ࿦จʹؚ·ΕΔൃදจݙ തֶ࢜Ґ࿦จ 1 দຊ ྄հ, WebαʔόͷߴूੵϚϧνςφϯτΞʔΩςΫνϟʹؔ͢Δݚڀ, 2017೥౓ ژ౎େ ֶେֶӃ৘ใֶݚڀՊ ത࢜࿦จֶҐ৹ࠪެௌձ

    2017೥5݄ژ౎େֶത࢜(৘ใֶ)ֶҐऔಘ, 2017 ೥. 
  134. ຊ࿦จʹؚ·ΕΔൃදจݙ ࿦จࢽ࿦จ 1 দຊ ྄հ, ܀ྛ ݈ଠ࿠, Ԭ෦ णஉ, ϦΫΤετ୯ҐͰԾ૝తʹϋʔυ΢ΣΞϦιʔεΛ෼཭͢

    ΔWebαʔόͷϦιʔε੍ޚΞʔΩςΫνϟ, ৘ใॲཧֶձ࿦จࢽ, Vol.59, No.3, pp.1016-1025, Mar 2018. 2 দຊ ྄հ, ܀ྛ ݈ଠ࿠, Ԭ෦णஉ, WebαʔόͷߴूੵϚϧνςφϯτΞʔΩςΫνϟͱӡ༻ٕ ज़, ిࢠ৘ใ௨৴ֶձ࿦จࢽ, Vol.J101-B, No.1, pp.16-30, Jan 2018. 
  135. ຊ࿦จʹؚ·ΕΔൃදจݙ ࿦จࢽ࿦จ 3 দຊ ྄հ, Ԭ෦ णஉ, mod_mruby: εΫϦϓτݴޠͰߴ଎͔ͭলϝϞϦʹ֦ுՄೳͳWebαʔ όͷػೳ֦ுࢧԉػߏ,

    ৘ใॲཧֶձ࿦จࢽɼVol.55, No.11, pp.2451-2460, Nov 2014. 4 দຊ ྄հ, Ԭ෦णஉ,εϨου୯ҐͰݖݶ෼཭Λߦ͏WebαʔόͷΞΫηε੍ޚΞʔΩςΫ νϟ,ిࢠ৘ใ௨৴ֶձ࿦จࢽ Vol.J96-B, No.10, pp.1122-1130, Oct 2013. 5 দຊ ྄հ, ઒ݪক࢘, দԬً෉, େن໛ڞ༗ܕWebόʔνϟϧϗεςΟϯάج൫ͷηΩϡϦςΟ ͱӡ༻ٕज़ͷվળ, ৘ใॲཧֶձ࿦จࢽ, Vol.54, No.3, pp.1077-1086, Mar 2013. 
  136. ຊ࿦จʹؚ·ΕΔൃදจݙ ࠃࡍձٞൃදʢࠪಡ෇͖ʣ 1 Ryosuke Matsumoto, Yasuo Okabe, Access Control Architecture

    Separating Privilege by a Thread on a Web Server, The 12th IEEE/IPSJ International Symposium on Applications and the Internet (SAINT2012), pp.178-183, July 2012.