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
クラウドとオンプレ / on the Cloud or Premises
Search
Harukasan
PRO
March 12, 2015
Technology
5
8.9k
クラウドとオンプレ / on the Cloud or Premises
pixiv SPRING BOOTCAMP 2015 講義資料
Harukasan
PRO
March 12, 2015
Tweet
Share
More Decks by Harukasan
See All by Harukasan
pixivを支える技術 / 技育CAMPアカデミア
harukasan
PRO
3
380
20240401 新卒研修 - ピクシブにおける技術領域
harukasan
PRO
1
690
ピクシブのコンテンツ配信基盤技術 / pixiv TECH SALON
harukasan
PRO
5
5.4k
Goにおける画像ファイル処理 / golang.tokyo #19
harukasan
PRO
7
6.5k
WebRTC動画をトランスコードする / Transcoding video streams from WebRTC
harukasan
PRO
5
1.5k
ImageFluxを支えるリモート開発 / 20171202
harukasan
PRO
2
1.8k
YAPC::Fukuoka 前夜祭LT / Yet Another Pawoo Commit logs
harukasan
PRO
0
2.9k
YAPC::Fukuoka lunch session
harukasan
PRO
1
3k
マストドン会議: Pawoo / Mastodon Kaigi2
harukasan
PRO
2
430
Other Decks in Technology
See All in Technology
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
Platform Engineering for Software Developers and Architects
syntasso
1
520
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
フルカイテン株式会社 採用資料
fullkaiten
0
40k
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
SSMRunbook作成の勘所_20241120
koichiotomo
2
130
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1366
200k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
We Have a Design System, Now What?
morganepeng
50
7.2k
Ruby is Unlike a Banana
tanoku
97
11k
GitHub's CSS Performance
jonrohan
1030
460k
Designing the Hi-DPI Web
ddemaree
280
34k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Facilitating Awesome Meetings
lara
50
6.1k
Transcript
ΫϥυͱΦϯϓϨ Shunsuke Michii / Harukasan 2015-03-11
Harukasan / Shunsuke Michii • 2012ʹ৽ଔͱͯ͠ΠϯϑϥνʔϜʹଐ • ίϯςϯπ৴Λ͡Ίͱͯ͠αʔϏεશମͷج൫Λ୲ • αʔϏεج൫͚ͩͰͳ͘σʔλղੳج൫ͷߏஙͳͲ
• ٕज़ܥࡶࢽͷࣥචͳͲ ϐΫγϒגࣜձࣾɹΠϯϑϥνʔϜ
Agenda • WebαʔϏεʹ͓͚ΔΠϯϑϥετϥΫνϟ • ΫϥυͱΦϯϓϨϛεͷҧ͍ • ΫϥελϦϯάͱΦʔέετϨʔγϣϯ
WebαʔϏεʹ͓͚Δ ΠϯϑϥετϥΫνϟ • ͦͦΠϯϑϥετϥΫνϟͱ • ΤϯδχΞϦϯάεέʔϧ͠ͳ͍ • ΠϯϑϥνʔϜͱ • ΠϯϑϥετϥΫνϟεέʔϧ͢Δ
Q1 ͋ͳ͕ͨWebαʔϏεΛઃܭ͢ΔͳΒ ͲͷΑ͏ͳߏΛߟ͑Δ͔ʁ
Application Application Database Cache Storage Application Application Load Balancer DNS
? ? ? ? ? ? ? ? Application Application
Database Cache Storage Application Application Load Balancer DNS
Server Server Server Server Server Local Network Internet Server Server
/ Appliance Server Server Application Application Database Cache Storage Application Application Load Balancer DNS
Heroku Add-on Add-on Add-on Application Add-on DNS Database Cache Storage
EC2 EC2 RDS ElastiCache S3 EC2 EC2 ELB Route53 Database
Cache Storage Application Application Application Application DNS Load Balancer
DNS
ͦͦ ΠϯϑϥετϥΫνϟͱ • αʔϏεΛӡ༻͢Δ্Ͱɺ߃ৗతʹඞཁͱͳΔج൫ • αʔϏεΛߏங͢Δ্ͰͱͳΔͷ • ࣗͰΒͳ͍ͱ͜Ζ
ΠϯϑϥετϥΫνϟ ͦΕࣗՁΛੜ·ͳ͍ • ຊʹՁ͕͋Δͷӡ༻͍ͯ͠ΔαʔϏεɺ͍҃ αʔϏε͕ఏڙ͍ͯ͠ΔͷͰ͋Δ • Πϯϑϥͱͯ͠ԿΛબ͢Δ͔ɺͲ͏͍͏ߏʹ͢ Δ͔ͱ͍ͬͨߏஙϊϋ͕ՁʹͳΔ͜ͱ͋Δ ͕ɺΠϯϑϥࣗମՁʹͳΒͳ͍
Ͳ͜ͰՁΛੜΉ͔ • ΠϯϑϥΑΓ্ͷϨΠϠʔͰՁΛੜΈग़͢ • ʢΤϯδχΞͱͯ͠ʣͲ͜ͰՁΛग़͔͕͢ॏཁ
Contents σβΠϯɾίʔσΟϯά ίϯςϯπࣥච DNS value value
DNS Contents Heroku Add-on Database Add-on Cache Add-on Storage Application
σβΠϯɾίʔσΟϯά ઃܭɾ։ൃ γεςϜઃܭ ίϯςϯπࣥච value value value value
ΤϯδχΞϦϯά εέʔϧ͠ͳ͍ • ࣗͷೳྗ͕ٸʹ100ഒʹͳΔ͜ͱͳ͍ • ʢΤϯδχΞͱͯ͠ʣͲ͜ͰՁΛग़͔͕͢ॏཁ
εέʔϧ͠ͳ͍ͷΛ࡞Βͳ͍ • 1ਓ͔͠ఏڙ͠ͳ͍αʔϏεͦΕҎ্ͷՁΛੜΊ ͳ͍ • ਓεέʔϧ͠ͳ͍͕ʢ͠ͳ͍ͷͰʣɺ༻͢Δਓ ͕ଟ͍΄Ͳ1ਓʹఏڙ͢ΔαʔϏεͷίετԼ͕Δ • εέʔϧ͢ΔϚʔέοτ͕͋Δ͔
ΠϯϑϥνʔϜͱ • αʔϏεΠϯϑϥΛ։ൃऀʹఏڙ͢Δ • ͬͯΔ͜ͱ֤ࣾΒΒ • ΠϯϑϥνʔϜࣗମ͕Πϯϑϥ
ΠϯϑϥνʔϜ Application
ʢۃΛݴ͏ͱʣࣗͷཱͪҐஔΑΓ ԼͷϨΠϠʔͯ͢Πϯϑϥ • ΠϯϑϥΤϯδχΞ͔ΒݟͨΒDCۀऀΠϯϑϥ • DCۀऀ͔ΒΈͯిؾࣄۀऀΠϯϑϥ • ։ൃऀ͔ΒΈͯΠϯϑϥΤϯδχΞΠϯϑϥ • ܦӦऀ͔ΒΈͯܧଓత։ൃΠϯϑϥʢʹࣄۀج൫ʣ
ΠϯϑϥετϥΫνϟ εέʔϧ͢Δ • ΠϯϑϥετϥΫνϟαʔϏεͱͯ͠εέʔϧ͢Δ • ύλʔϯԽͰ͖Δʹεέʔϧ͢Δ • εέʔϧ͢Ε͢Δ΄ͲίετϝϦοτ͕ग़Δ • ڊਓͷݞʹΔ
IaaS (Infrastructure as a Service) • WebαʔϏεͷΠϯϑϥετϥΫνϟΛαʔϏεͱ ͯ͠ఏڙ͢Δ • දతͳαʔϏεʹAWSɺGCPɺSoftLayerͳͲ
• ࣗࣾͷΠϯϑϥετϥΫνϟج൫ΛαʔϏεͱͯ͠ ఏڙ͍ͯ͠Δ
XaaS (X as a Service) • ͳΜͱ͔as a ServiceͱݺΕΔͷશ෦Πϯϑϥ ͳͷͰ·ͱΊͯIaaSͰΑ͍
• ͲͷϨΠϠʔ·Ͱఏڙ͍ͯ͠Δ͔Θ͔Βͳ͘ͳΔʢൺ ֱͰ͖ͳ͘ͳΔʣͷͰPaaSΈ͍ͨͳݴ༿͕ΘΕΔ
WebαʔϏεʹ͓͚Δ ΠϯϑϥετϥΫνϟ • ࣗͰΒͳ͍ͱ͜Ζ • ʢΤϯδχΞͱͯ͠ʣͲ͜ͰՁΛग़͔͕͢ॏཁ • ΠϯϑϥΛαʔϏεʹ͢Δͱεέʔϧ͢Δ ·ͱΊ:
break
IaaSͱΦϯϓϨ • ΦϯϓϨͱʁ • IaaSͱΦϯϓϨͷҧ͍
ΦϯϓϨϛε: On-Premises • ༁͢Δͱ"ߏʹ"ͱͳΔ • ͱͱࣾʹΠϯϑϥετϥΫνϟΛઃஔ͢Δ͜ ͱΛ͍ࣔͯͨ͠
ͳͥΦϯϓϨͱݴ͏ͷ͔ • Ϋϥυͷରٛޠ͕ͳ͔ͬͨ • Macͷରٛޠͱͯ͠ͷPC
ݱͷΦϯϓϨϛεڥ Ϋϥυʹ͍ۙ • ࣗࣾߏʹαʔό͓͍ͯΔͱ͜ΖͳΜͯ·Ε • ଏʹ”ΦϯϓϨ”ͱݺΕΔͱ͖αʔόIDCʹઃஔ ͯ͋͠Δ • ੈͷதͷ΄ͱΜͲͷΦϯϓϨ”ͳΜͪΌͬͯΦϯϓ Ϩϛε”ʹͳͬͯΔ
ຊͷΦϯϓϨϛε ͳΜͪΌͬͯΦϯϓϨϛε ઃஔॴ ࣗࣾDC ϗεςΟϯά αʔόઃஔɾཧ ࣗࣾ IDCɾϕϯμʔ ௐୡ ࣗࣾ
ࣗࣾɾϕϯμʔ ిݯ ࣗࣾܖ IDC ରࡦ ࣗࣾͰઃܭ IDC ճઢ ઐ༻ճઢ IDC ճઢࢹ ࣗࣾ IDC
Q2 IaaSͱΦϯϓϨϛεͷେ͖ͳҧ͍ͱʁ
IaaSͱΦϯϓϨͷҧ͍ • ͚ࣗͩͰ͏͔ɺΈΜͳͰ͏͔ • ͍ํ͕ҧ͏ͷͰ՝ۚମܥ͕େ͖͘ҟͳΔ
ΦϯϓϨͷௐୡ Load Infrastructure • ෛՙʹ߹ΘͤͯௐୡܭըΛཱͯΔ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά
↓
Waste ΦϯϓϨͷௐୡ Load • ෛՙʹ߹ΘͤͯௐୡܭըΛཱͯΔ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά
↓
ΦϯϓϨେม • ͏ͷશͯࣗͰ༻ҙࣗ͠Ͱӡ༻͢Δ • εέʔϧ͠ͳ͍ • ઌΛಡ·ͳ͍ͱ͍͚ͳ͍
IaaSͷௐୡ Load • ෛՙʹ߹Θͤͯ૿ݮͰ͖Δʢཧʣ
IaaSͷௐୡ Load • ෛՙʹ߹Θͤͯ૿ݮͰ͖Δʢݱ࣮ʣ
IaaS͚ͬ͜͏େม • ݁ہࣗͰεέʔϦϯά͢ΔΑ͏ʹ͠ͳ͚Εࣗಈ Ͱεέʔϧ͠ͳ͍ʢͪΐͬͱੲͷʣ • ୯Ձ͚ͩͰݟΕߴ͍
CPU୯Ձͷൺֱ • ʢඇެ։ʣ
ωοτϫʔΫ୯Ձͷൺֱ • ʢඇެ։ʣ
ίετͷҧ͍ • ୯Ձ͚ͩͰݟΕIaaSͷํ͕ߴͦ͏ʹݟ͑Δ • ࣮ࡍʹӡ༻ʹ͔͔Δਓ݅අɺDCΠϯϑϥʹ͔͔Δ ྉۚͳͲ͍ΖΜͳݻఆඅ͕͔͔Δ • େͷ߹IaaSͷํ͕εέʔϧϝϦοτͰ҆͘ͳΔ • ݻఆඅ͕খ͘͞ݟ͑Δ΄Ͳεέʔϧ͢ΕΦϯϓϨ
Ͱͬͨํ͕͍҆
IaaSͱΦϯϓϨ • ΦϯϓϨશ͕ͯࣗલͰͳ͍ʢͨΓલʣ • IaaSεέʔϧ͢Δ͜ͱͰϝϦοτΛग़͍ͯ͠Δ • CPU࣌ؒͰΈΔͱ͔ͳΓΑ͘ͳ͖ͬͯͨ • ωοτϫʔΫ͚ͬ͜͏ߴ͍ ·ͱΊ:
break
ΫϥελϦϯάͱ ΦʔέετϨʔγϣϯ • ΫϥελϦϯάͱΦʔέετϨʔγϣϯ • ͳͥΫϥελϦϯά͍ͨ͠ͷ͔ • ίϯςφΫϥελϦϯά
ΫϥελϦϯάͱ • ଟͷϦιʔεΛ1ͭͷϦιʔεͱͯ͠͏ • Ͱ͔͍Πϯελϯεߴ͍͠ɺSPOFʢ୯Ұোʣ ʹͳΔ • εέʔϦϯά͢Δʹ͍҆ϦιʔεΛͨ͘͞Μฒͯ 1ͭͷϦιʔεʹͯ͠Θͳ͍ͱ͍͚ͳ͍
ΦʔέετϨʔγϣϯͱ • Φʔέετϥͷԋํ๏ɺసͯ͡ฤɺ৫ԽΛ ࢦ͢୯ޠʹͳͬͨ • γεςϜ/ϛυϧΣΞͷࣗಈతͳߏཧɺσϓϩ Πϝϯτͷ͜ͱΛࢦ͢
ΫϥελϦϯά͍ͨ͠ • αʔϏεͷنΛ༧ଌ͢Δͷ͍͠ • ༻ҙ͍ͯ͠ΔΠϯϑϥΛ͙͢ʹೖ͍ͨ͠ • Ϋϥελશମͷ͏ܾͪ·ׂͬͨ߹ͷϦιʔεΛׂΓ ͍ͯͨ
ΦϯϓϨͷௐୡ Load • ෛՙʹ߹ΘͤͯௐୡܭըΛཱͯΔ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά ↓ ௐୡλΠϛϯά ↓
ʢ෮शʣ
Server Server Server Server Application Application Application Load balancer Application
Application
ΫϥελϦϯά͢ΔͨΊʹ ίϯςφΛ͏ • εέʔϧ͢ΔͨΊʹɺΞϓϦέʔγϣϯɺϛυϧΣ ΞɺઃఆͳͲ༷ʑͳͷΛσϓϩΠͯ͠ಈ࡞͢ΔΑ͏ ʹ͠ͳ͚ΕͳΒͳ͍ • ίϯςφ͝ͱσϓϩΠ͢Εྑ͍ =ΦʔέετϨʔγϣϯ͕؆୯
Docker • ίϯςφཧπʔϧ • DockerfileΛॻ͚ͩ͘ͰίϯςφΛϏϧυͰ͖Δ • ͍·ͷͱ͜ΖσϑΝΫτελϯμʔυ
dockerhub build push pull Dockerfile deployment Image
ͳͥίϯςφʹ͍ͨ͠ͷ͔ • ґଘؔΛύοέʔδϯά͍ͨ͠ • ։ൃऀ͕ϛυϧΣΞͷґଘؔΛཧ͢Δ͜ͱ͕ Ͱ͖ΔΑ͏ʹͳΔ • ίϯςφΛ͏ͱ͜Ε·ͰΠϯϑϥͩͬͨͷ͕ ΠϯϑϥͰͳ͘ͳΔ
Infrastructure Application
Infrastructure Application Container
ίϯςφԽ͞ΕΔͱԿ͕ى͜Δ͔ • ΠϯϑϥͷϨΠϠʔ͕1ͭԼ͕Δ • OSͷύοέʔδཧෆཁʹͳΔ • ίϯςφ͝ͱʹࢹ͕ඞཁʹͳΔ
CoreOS • ίϯςφϗετʹ࠷దԽ͞ΕͨLinuxσΟετϦ Ϗϡʔγϣϯ • systemdʹΑΔίϯςφͷཧͱEtcdɺFleetdͱ͍ͬ ͨΫϥελϦϯάɺΦʔέετϨʔγϣϯπʔϧ͔Β ߏ͞ΕΔ • ࣗಈతͳηΩϡϦςΟΞοϓσʔτ
ΦʔέετϨʔγϣϯ͕Γͳ͍ • ͍ͭ͘ίϯςφΛσϓϩΠ͢Δ͔ • ίϯςφؒͷ૬ޓଓͲ͏͢Δ͔ • ͲͷλΠϛϯάͰεέʔϧ͢Ε͍͍͔
Kubernates • Google͕ͭͬͨ͘ίϯςφΫϥελཧπʔϧ • αʔϏε୯ҐͰͷσϓϩΠ͕Ͱ͖Δ • ͍͍ͩͨશ෦ͷػೳ͕͋Δ͚ͲɺͰ͔͗͢Δ
ͦͦࣗͰΔҙຯ • ίϯςφΛσϓϩΠ͢ΔઌΛࣗલͰΒͳͯ͘ྑ ͍ͷͰ • ͋ΔఔͷεέʔϧʹͳΔͱࣗͰΔ͜ͱΛߟ͑Δ
ΫϥελϦϯάͱ ΦʔέετϨʔγϣϯ • Ͳ͜·Ͱ͕Πϯϑϥ͔࣌ʹΑͬͯมԽ͢Δ • ίϯςφΛ͏ͱ͍Ζ͍ΖͱมΘΓͦ͏ • ͍Ζ͍Ζͱߟ͑ͳ͍ͱ͍͚ͳ͍͜ͱ͕ଟ͍ ·ͱΊ:
·ͱΊ
ΫϥυͱΦϯϓϨ • ΫϥυͰ͋Δ͔Βͱ͔ɺΦϯϓϨͰ͋Δ͔Βɺ ͱ͍͏ͷ͋·Γେ͖ͳͰͳ͍ • ࠷࠷దͳج൫Λબ͢Δͷ͕Α͍ • ͩΊʹͳͬͨΒΓ͑Εྑ͍ • ʢΤϯδχΞͱͯ͠ʣͲ͜ͰՁΛग़͔͕͢ॏཁ