Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ロリポップ!マネージドクラウド FastContainerの裏側
Search
ry023
September 15, 2017
Technology
0
180
ロリポップ!マネージドクラウド FastContainerの裏側
GMO HosCon 10&11 発表時の資料です
ry023
September 15, 2017
Tweet
Share
More Decks by ry023
See All by ry023
ロリポップ!マネージドクラウドをセットアップしてみよう!(ver.PHPカンファレンス福岡2019)
ry023
0
220
hoscon-golang-handson
ry023
2
1.2k
コンテナ母艦サーバが 突然停止しても障害にならない、 そうマネクラならね
ry023
1
370
nameraka-hosting-lolipop-managed-cloud
ry023
0
2.3k
Other Decks in Technology
See All in Technology
AGIについてChatGPTに聞いてみた
blueb
0
130
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Terraform Stacks入門 #HashiTalks
msato
0
360
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
250
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
170
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
160
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to train your dragon (web standard)
notwaldorf
88
5.7k
GitHub's CSS Performance
jonrohan
1030
460k
BBQ
matthewcrist
85
9.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Agile that works and the tools we love
rasmusluckow
327
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Building an army of robots
kneath
302
43k
How to Ace a Technical Interview
jacobian
276
23k
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
ాதྒհ(.01FQBCP *OD (.0)PT$PO ϩϦϙοϓʂϚωʔδυΫϥυ 'BTU$POUBJOFSͷཪଆ
ΤϯδχΞ ాதྒհ!SZ@ ϗεςΟϯάࣄۀ෦ΠϯϑϥνʔϜ ݄۽ຊେֶେֶӃใిؾిࢠֶઐ߈मྃ ಉ݄(.0ϖύϘʹ৽ଔΤϯδχΞͱͯ͠ೖࣾ ݄͔ΒΠϯϑϥνʔϜଐ
࣍ wϩϦϙοϓʂϚωʔδυΫϥυʹ͍ͭͯ w'BTU$POUBJOFSͱʁ wϚωΫϥͷߏΛ௨ͯ͠ղઆ wϦΫΤετ੍ޚϑϩʔɺίϯςφఀࢭɺΦʔτεέʔϧ w౷ׅɾ'BTU$POUBJOFSͷྑ͞;Γ͔͑Γ
ϖύϘͷϗεςΟϯάαʔϏε
ϩϦϙοϓʂͷ৽ϓϥϯ Ћςετ࣮ࢪதʂ
Ұൠతͳ8FCϗεςΟϯά wϢʔβͷίϯςϯπɾϓϩηε͕ಛఆͷαʔόʹඥͮ͘ wෛՙࢄͷ͠͞ʜ wٸͳΞΫηε૿ͷεέʔϧͷ͠͞ʜ wଞαʔόͷҠߦͷ͠͞ʜ
ϩϦϙοϓʂϚωʔδυΫϥυ wϩϦϙͷϓϥϯͷҰ͕ͭͩɺόοΫΤϯυɾϑϩϯτΤϯυڞʹҰ৽ wίϯςφܕϗεςΟϯάαʔϏε w'BTU$POUBJOFSΞʔΩςΫνϟΛ࠾༻ wίϯςφΤϯδϯʹIBDPOJXB
ϩϦϙοϓʂϚωʔδυΫϥυ ΦʔτεέʔϧͰ ٸͳΞΫηεʹରԠ ࣗಈͰ࠷৽ͷ ηΩϡϦςΟ ༷ʑͳ8FCΞϓϦΛ ͙͢ʹ։࢝
͍͍ͨΞϓϦબΜͰ ϓϩδΣΫτ໊ೖྗ͢Δ͚ͩ Ͱ͖Δʂ ͙͢ʹ8FCΞϓϦΛఏڙʂ
͙͢ʹ8FCΞϓϦΛఏڙʂ
Φʔτεέʔϧ ΞΫηε͕૿͑Δͱ ෳͷίϯςφͰΞΫηεΛड͚Δ ΦʔτεέʔϧΛ༗ޮʹ
ࠓϩϦϙʂϚωΫϥ͕ Ͳ͏͍͏Α͏ʹಈ͍͍ͯΔ͔ ͱ͍͏͓Λ
'BTU$POUBJOFS
'BTU$POUBJOFSͱʁɹͬ͘͟Γ֓ཁ w'BTU$(*ͷίϯςφ൛ͱ͍ͬͨΠϝʔδ w$(*ͷϓϩηεΛऴྃͤͣʹ͍ճ͢ wϦΫΤετܖػͰ8FCΞϓϦͷίϯςφ͕ىಈ wҰىಈͨ͠ίϯςφͦͷޙ͍ճ͢ wҰఆ࣌ؒܦա͢ΔͱࣗΒఀࢭ͢Δ
'BTU$POUBJOFSͷྑ͞ wΦʔτεέʔϧ wϦΫΤετ͕ͳ͍ͱίϯςφఀࢭ͢ΔͷͰϦιʔεͷઅ w৭ΜͳίϯςφΛ༻ҙ͢Δ͜ͱͰ৭ʑͳΞϓϦΛఏڙ wੜ·ΕΘΓଓ͚ΔͷͰৗʹ࠷৽ wଞϗετͷίϯςφࡌͤସ͑؆୯ wෛՙ͕গͳ͍ϗετʹίϯςφΛىಈͤ͞ΔΑ͏ʹ͢Δ wDPNQVUF؋ͷແఀࢭϝϯςͰ͖ͦ͏
ϩϦϙͷߏΛ௨ͯ͠ 'BTU$POUBJOFSΛݟ͍͖ͯ·͢
ϚωʔδυΫϥυશମߏ
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPOUBJOFS DPNQVUF OGT OGT
DPOUBJOFS DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF ίϯςφͷใ 8FCQSPYZ ࣮ࡍίϯςφ͕ىಈ͢Δϗετ ίϯςφͷใΛཧˠ 'BTU$POUBJOFSؔ࿈ͷߏ Ϣʔβͷ ίϯςϯπ WBSXXXԼ
OHY@NSVCZ wฐࣾ!NBUTVNPUPSZ։ൃOHJOY֦ு NPE@NSVCZ͋Γ·͢ w/HJOYͷ֤ΠϕϯτʹIPPLͯ͠NSVCZΛ࣮ߦͰ͖Δ wϩϦϙʂϚωʔδυΫϥυͰϓϩΩγ࣌ʹ$PSF"1*ʹ͍߹Θͤ ͨΓɺIBDPOJXBΛ࣮ߦͨ͠Γ͢Δͷʹ׆༻ location / {
... mruby_set $backend /var/lib/mruby/hook.rb cache; # script࣮ߦ proxy_pass http://$backend:80; }
IBDPOJXB wฐࣾ!VE[VSB։ൃίϯςφΤϯδϯ wNSVCZͷ%4-Ͱઃఆ IBDPGJMF Λهड़Մೳ wίϯςφͷϦιʔε੍ݶ DHSPVQʹΑΔ੍ݶ Haconiwa.define do |config|
config.chroot_to Pathname.new("/var/lib/haconiwa/rootfs/php") ... config.cgroup["cpu.cfs_period_us"] = 1000000 # cpu༻Λ੍ݶ(20%) config.cgroup["cpu.cfs_quota_us"] = 200000 # config.cgroup["pids.max"] = 128 # ϓϩηεΛ੍ݶ end
ϚωΫϥͷίϯςφ wIBDPOJXBʹΑΓىಈ IBDPGJMFͰઃఆ wίϯςφछผຖʹ؋ DPNQVUF ্ʹSPPUGTΛ༻ҙͯ͠TZNMJOL wDPOUBJOFSˠDPNQVUFWBSMJCIBDPOJXBSPPUGTQIQ wWBSXXXͳͲͷϢʔβྖҬEBUBQPPMΛNPVOU wJOJUϓϩηεʹϛυϧΣΞΛࢦఆͯ͠ىಈ wΞϓϦछผ͝ͱʹIBDPGJMFΛ༻ҙ͢Δ͜ͱͰ৭Μͳίϯςφ࡞ΕΔ
ͳΜͰίϯςφ wجຊίϯςφʹϓϩηε wBQBDIFίϯςφ wTTIEίϯςφ wQPTUGJYίϯςφʁ
'BTU$POUBJOFS ϦΫΤετ੍ޚͷϑϩʔ
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS
TUBUVTSFBEZ IPTUDPNQVUF ίϯςφͷใ 8FCQSPYZ ϓϩδΣΫτ։࢝ޙ SFBEZػத
DPNQVUF EBUBQPPM DPNQVUF OGT OGT ίϯςφͷใ ϓϩδΣΫτ։࢝ޙ DPOUBJOFS TUBUVTCPPUJOH IPTUDPNQVUF
$PSF"1* -# $MJFOU 8FCQSPYZ $.%# ϓϩΩγՄೳͳ ίϯςφใΛऔಘ ΫϥΠΞϯτ͔Β ϦΫΤετ
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS
TUBUVTCPPUJOH IPTUDPNQVUF ίϯςφͷใ ϓϩδΣΫτ։࢝ޙ ΫϥΠΞϯτ͔Β ϦΫΤετ ίϯςφͷ*1Λ ϔομʹෛՙ͠ϓϩΩγ 8FCQSPYZ
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS
TUBUVTCPPUJOH IPTUDPNQVUF ίϯςφͷใ 8FCQSPYZ ϓϩδΣΫτ։࢝ޙ ΫϥΠΞϯτ͔Β ϦΫΤετ ίϯςφͷ*1Λ ϔομʹෛՙ͠ϓϩΩγ తͷίϯςφͷ*1͕ -*45&/ͯ͠ͳ͍
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF OGT OGT ίϯςφͷใ
8FCQSPYZ ϓϩδΣΫτ։࢝ޙ ΫϥΠΞϯτ͔Β ϦΫΤετ DPOUBJOFS ίϯςφىಈʂʂ DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF FOBCMFEՔಇத
DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF
OGT OGT ίϯςφͷใ 8FCQSPYZ ϓϩδΣΫτ։࢝ޙ ΫϥΠΞϯτ͔Β ϦΫΤετ DPOUBJOFS ίϯςφىಈʂʂ FOBCMFEՔಇத
DPNQVUF $.%# $PSF"1* -# $MJFOU EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS
TUBUVTFOBCMFE IPTUDPNQVUF ίϯςφͷใ 8FCQSPYZ ϓϩδΣΫτ։࢝ޙ DPOUBJOFS ճҎ߱ͷϦΫΤετ ίϯςφىಈࡁΈͳͷͰߴ
ίϯςφͷࢮ
ίϯςφͷण໋ wίϯςφʹ-JGFUJNF͕ઃఆ͞Ε͓ͯΓɺҰఆ࣌ؒܦաͰࣗಈఀࢭ wIBDPOJXBͷIPPLͰίϯςφͷϓϩηεΛ,*-- wར༻தͷίϯςφ͕ఀࢭ͢ΔࡍίϯςφΛػதͱͯ͠ొ͢͠ w࣍ͷϦΫΤετͰ·ͨ৽͍͠ίϯςφ͕ىಈ͢Δ
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ ίϯςφͷण໋ ʘण໋͖ͨʗ DPOUBJOFS
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTSFBEZ IPTUDPNQVUF
ίϯςφͷใ ίϯςφͷण໋ ػத SFBEZ ίϯςφΛ࠶ొ )"-5
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ ίϯςφͷण໋ -# $MJFOU 8FCQSPYZ ϦΫΤετܖػͰ ৽͍͠ίϯςφىಈ DPOUBJOFS
ίϯςφʹण໋͕͋Δ͜ͱͰʜ wϦΫΤετ͕ͳ͍ίϯςφউखʹఀࢭ͠ɺϦιʔεΛ৯ΘͣΤίʂ wఆظతʹίϯςφ͕৽͘͠ੜ·ΕมΘΔ w৽͘͠ͳΔλΠϛϯάͰϥΠϒϥϦߋ৽͞ΕηΩϡΞ wίϯςφΛผϗετʹҠߦ͍ͨ࣌͠$.%#Λ͍͡Δ͚ͩͰ0, wίϯςφ໌ࣔతʹఀࢭͤͣ͞ͱউखʹࢮ͵ wDPNQVUF ίϯςφͷ؋ ͷϝϯς͍ͨ࣌͠؆୯
Φʔτεέʔϧ
Φʔτεέʔϧ wίϯςφͷෛՙʹԠͯ͡ɺίϯςφΛ૿ݮ wIBDPOJXB͕DHSPVQ͔Β֤ίϯςφͷDQVɾJPෛՙΛܭଌɾࢹ wϢʔβίϯςφͷ༧ΛઃఆՄೳ wίϯςφ͕Կ·Ͱىಈ͢Δ͔ɺͦΕͧΕͷίϯςφͰϦιʔεΛ ͲΕ͙Β͍͏͔ͳͲࣄલʹܾఆ͓ͯ͘͠
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΞτ DPOUBJOFS DPOUBJOFS TUBUVTEJTBCMFE IPTUDPNQVUF ༧Λొ
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΞτ DPOUBJOFS DPOUBJOFS TUBUVTEJTBCMFE IPTUDPNQVUF ༧Λొ ʘෛՙ͍ʗ ίϯςφ૿ͯ͠ʂ
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΞτ DPOUBJOFS ػίϯςφʹ มߋ DPOUBJOFS TUBUVTSFBEZ IPTUDPNQVUF -# $MJFOU 8FCQSPYZ ϦΫΤετܖػͰ ৽͍͠ίϯςφىಈ DPOUBJOFS
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΠϯ DPOUBJOFS DPOUBJOFS TUBUVTSFBEZ IPTUDPNQVUF DPOUBJOFS ʘ͞΄ͲͰͳ͍ʗ ίϯςφݮΒͯ͠ʂ
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΠϯ DPOUBJOFS DPOUBJOFS ʘ͞΄ͲͰͳ͍ʗ ίϯςφݮΒͯ͠ʂ DPOUBJOFS TUBUVTEJTBCMFE IPTUDPNQVUF ࠶ͼEJTBCMFE
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΠϯ DPOUBJOFS DPOUBJOFS DPOUBJOFS TUBUVTEJTBCMFE IPTUDPNQVUF -# $MJFOU 8FCQSPYZ DPOUBJOFSʹ ϧʔςΟϯά͞Εͳ͍
DPNQVUF $.%# $PSF"1* EBUBQPPM DPNQVUF OGT OGT DPOUBJOFS TUBUVTFOBCMFE IPTUDPNQVUF
ίϯςφͷใ εέʔϧΠϯ DPOUBJOFS DPOUBJOFS DPOUBJOFS TUBUVTEJTBCMFE IPTUDPNQVUF -# $MJFOU 8FCQSPYZ DPOUBJOFSʹ ϧʔςΟϯά͞Εͳ͍ ͜Ε์͓͚ͬͯ উखʹఀࢭ͢Δ
༧ΛͱΔ͚ͩͰ Φʔτεέʔϧ
'BTU$POUBJOFSͷྑ͞ wΦʔτεέʔϧ wϦΫΤετ͕ͳ͍ͱίϯςφఀࢭ͢ΔͷͰϦιʔεͷઅ w৭ΜͳίϯςφΛ༻ҙ͢Δ͜ͱͰ৭ʑͳΞϓϦΛఏڙ wੜ·ΕΘΓଓ͚ΔͷͰৗʹ࠷৽ wଞϗετͷίϯςφࡌͤସ͑؆୯ wෛՙ͕গͳ͍ϗετʹίϯςφΛىಈͤ͞ΔΑ͏ʹ͢Δ wDPNQVUF؋ͷແఀࢭϝϯςͰ͖ͦ͏
ίϯςφͷछྨ૿͍͖͍ͯͨ͠
ΞϓϦͷௐͳͲਐḿ ЋͰఏڙதʂ ௐதؒͳ͘ ͦͷଞଓʑʜʜʁ
ϩϦϙʂϚωʔδυΫϥυΛ ΑΖ͓͘͠ئ͍͠·͢ʂ
܅ϖύϘͰಇ͔ͳ͍͔ʁ ࠷৽ͷ࠾༻ใΛνΣοΫˠ !QC@SFDSVJU