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
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
680
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
強いチームと開発生産性
onk
PRO
35
11k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
260
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
29
13k
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
複雑なState管理からの脱却
sansantech
PRO
1
160
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Automating Front-end Workflow
addyosmani
1366
200k
Building Your Own Lightsaber
phodgson
103
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Designing the Hi-DPI Web
ddemaree
280
34k
BBQ
matthewcrist
85
9.3k
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