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
今あえて試行錯誤しながら"車輪の再発明"をする意味 / jtf2016-reinventing...
Search
rrreeeyyy
July 25, 2016
Programming
26
4.7k
今あえて試行錯誤しながら"車輪の再発明"をする意味 / jtf2016-reinventing-the-wheel
#jtf2016 (
http://2016.techfesta.jp/
) にて『今あえて試行錯誤しながら"車輪の再発明"をする意味』というタイトルで発表しました。
rrreeeyyy
July 25, 2016
Tweet
Share
More Decks by rrreeeyyy
See All by rrreeeyyy
An Efficient Incident Response Training with AI / SRE NEXT 2024 Sponsor Session
rrreeeyyy
1
2.7k
カンファレンスから見る SRE トレンド 2024 / SRE Trends from Conferences in 2024 #SRE_Findy
rrreeeyyy
4
2.1k
信頼性の育て方 / mackerel-meetup-15
rrreeeyyy
9
2.3k
SRE の歩き方・進め方 / sre-walk-through-procedure
rrreeeyyy
0
8.5k
「信頼性」を保ちつつ大規模サービスをリニューアルする / cookpad-tech-kitchen-service-embedded-sres
rrreeeyyy
11
12k
Cookpad and Prometheus
rrreeeyyy
6
20k
SRE-Lounge-8-Cookpad-Microservice-Architecture-Overview
rrreeeyyy
5
5.2k
A survey of anomaly detection methodologies for web system
rrreeeyyy
5
1.2k
エンジニアリングをちゃんとやる あるいは 人類の平和 について / wsa02-rrreeeyyy
rrreeeyyy
13
3k
Other Decks in Programming
See All in Programming
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
590
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
150
o1モデルのプロンプトエンジニアリングって?
ktc_wada
0
270
仮想ファイルシステムを導入して開発環境のストレージ課題を解消する
segadevtech
2
550
Understand the mechanism! Let's do screenshots tests of Compose Previews with various variations / 仕組みから理解する!Composeプレビューを様々なバリエーションでスクリーンショットテストしよう
sumio
3
810
Jakarta EE meets AI
ivargrimstad
1
520
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
The Shape of a Service Object
inem
0
520
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
340
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
420
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
220
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Rails Girls Zürich Keynote
gr2m
93
13k
GraphQLとの向き合い方2022年版
quramy
43
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
120
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
157
15k
Building Flexible Design Systems
yeseniaperezcruz
325
38k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
The Cult of Friendly URLs
andyhume
76
6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
Transcript
ࠓ͋͑ͯࢼߦࡨޡ͠ͳ͕Β "ंྠͷ࠶ൃ໌"Λ͢Δҙຯ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota
( @rrreeeyyy ) / Topotal 1
July
Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 2
ंྠͷ࠶ൃ໌ (reinven(ng the wheel) ंྠΛࡐʹͨ͠׳༻۟Ͱ͋Γɺ ੈքதͰΘΕ͍ͯΔɻ ͘ड͚ೖΕΒΕཱ֬͞Ε͍ͯΔ ٕज़ղܾ๏ΛΒͣʹ ʢ·ͨҙਤతʹແࢹͯ͠ʣɺ ಉ༷ͷͷΛ࠶ͼҰ͔Β࡞Δ͜ͱ
— h$ps://ja.wikipedia.org/wiki/ंྠͷ࠶ൃ໌ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 3
ंྠͷ࠶ൃ໌͖ͳਓʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (
@rrreeeyyy ) / Topotal 4
ंྠͷ࠶ൃ໌ݏ͍ͳਓʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (
@rrreeeyyy ) / Topotal 5
ͳ͍ͥ·ंྠͷ࠶ൃ໌ͳͷ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (
@rrreeeyyy ) / Topotal 6
എܠ 1. ΠϯϑϥΤϯδχΞϓϩτίϧɾϨΠϠͷࣝΛ࣋ͭඞཁ͕͋Δ • Infrastructure Complexity • Ճ͑ͯɺ৽͍֓͠೦ɾϓϩμΫτͳͲ͕ొ͢Δ 2. ΠϯϑϥΤϯδχΞίʔυ͕ॻ͚Δඞཁ͕͋Δ
• Infrastructure as code • ΠϯϑϥͷίʔυԽ • Site Reliability Engineer • ϓϩμΫτࣗମͷίʔυϨϏϡʔͳͲͱ͍ͯ͠Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 7
July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy
) / Topotal 8
ͳ͍ͥ·ंྠͷ࠶ൃ໌ͳͷ͔ʁ 1. ϓϩτίϧɾϨΠϠͷཧղ͕ਂ·Δ • → ίʔυԽɾෳࡶԽ͕ਐΉࡢࠓͰඇৗʹྑ͍ษڧ๏ͱͳΔ 2. ίʔσΟϯάͷྑ͍࿅शʹͳΔ • →
ιʔεɾ༷ΛಡΈखΛಈ͔࣮ͯ͠·Ͱ͢ΔͷͰඇৗʹ࿅शʹͳΔ 3. දతϓϩμΫτΛ࡞ΕΔՄೳੑ͕͋Δ • → ࠶ൃ໌ͨ͠ͷʹΞΠσΞΛՃ͑ΔࣄͰൃ໌ʹͳΓ͑Δ → ෳࡶԽɾίʔυԽ͕ਐΉࡢࠓɺΠϯϑϥΤϯδχΞʹΦεεϝͷษڧ๏ͩͱߟ͑Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 9
Shut the fuck up and write some code? 1 1
h$ps:/ /speakerdeck.com/mizzy/serverspec-at-j92014?slide=75 July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 10
... but How? July Tech Festa 2016 2016/07/24 - Yoshikawa
Ryota ( @rrreeeyyy ) / Topotal 11
Lv1. ࣸܦ Lv2. ंྠͷ࠶ൃ໌ Lv3. දతϓϩμΫτ July Tech Festa 2016
2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 12
Lv1. ࣸܦ • ଟ͘ͷਓ͔͜͜Βελʔτ • ৽͘͠ϓϩάϥϛϯάΛ࢝ΊΔͱ͖ • ৽͍͠ϓϩάϥϛϯάݴޠΛ֮͑Δͱ͖ • ࣸܦ͋ΔҙຯͰंྠͷ࠶ൃ໌
• ํ๏ɾॻ੶ͱʹॆ࣮͍ͯͯ͠ଟ͘ͷਓ࣮ફͰ͖Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 13
ࣸܦͷͦͷޙ... • ࡞Γ͍ͨͷ͕͋ΔʁૉΒ͍͠ΞΠσΞ͕͋Δʁ • → ͥͻ࡞Γ·͠ΐ͏ʂ • → Ͱଟ͘ͷਓ͜͏Ͱͳ͍ •
Α͘ฉ͘ݴ༿ • → ʮԿ࡞Γ͍ͨͷ͕ͳ͍...ʯ • → ंྠͷ࠶ൃ໌Λࢼͯ͠ΈΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 14
Lv2. ंྠͷ࠶ൃ໌ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota
( @rrreeeyyy ) / Topotal 15
Lv2. ंྠͷ࠶ൃ໌ • ϓϩάϥϛϯάͷΓํ͕Կͱͳ͔͖ͬͯͨ͘ࠒ͔Β • ࣗͷษڧ͍ͨ͠ϓϩτίϧɾΞϧΰϦζϜΛ࣮͢Δ • ϓϩτίϧɾΞϧΰϦζϜͷษڧʹͳΓҰੴೋௗ • ࣗͷ͍ͬͯΔϓϩμΫτʹࣅ͍ͯΔͷΛ࡞ͬͯΈΔ
• Ͳ͏͍͏࣮ͳͷ͔ʁͲ͕͜ϘτϧωοΫʹͳΓͦ͏ͳͷ͔ʁ • ͳΜͱͳ͘૾Ͱ͖ΔΑ͏ʹͳΔ • ࣮ࡍʹݟͯΈΔͱ͍͢͝ίʔυ͕ॻ͍ͯ͋ͬͯษڧʹͳΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 16
EX1. HTTP αʔόͷࣗ࡞ • HTTP ϓϩτίϧΛΔ TCP αʔόΛࣗ࡞ͯ͠ΈΔ • جຊͰ͋Δ
HTTP ϓϩτίϧΛ͔ͬ͠ΓཧղͰ͖Δ • HTTP ͱͲ͏͍͏ϓϩτίϧͳͷ͔ʁ • Ͳ͏͍͏ϔομ͕͋ΓͲ͏͍͏͕͋Δͷ͔ʁ • Apache, Nginx ͷ HTTP αʔόͷجຊతͳಈ͖͔ΔΑ͏ʹͳΔ • Apache ͱ Nginx ͰͲ͏͍͏ҧ͍͕͋ΓԿʹ͕ࠩͰΔͷ͔ʁͳͲ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 17
EX1. HTTP αʔόͷࣗ࡞ • ͍͔͠ͱࢥ͍͖ಈ͔͚ͩ͢ͳΒҙ֎ͱ؆୯ • ݴޠʹΑΔ͕ 100 ߦఔ͋Εϒϥβ͔ΒݟΕΔαʔό͕࡞ΕΔ •
࣮͢Δݴޠ࠷ॳ׳ΕͯΔݴޠɾษڧ͍ͨ͠ݴޠͰྑ͍ • ͔ͬ͠Γ࣮͠Α͏ͱࢥ͏ͱߋʹ৭ʑͳࣄֶ͕Δ • I/O (C10K ): select(), epoll() ͳͲʹ͍ͭͯͷࣝ • ֤छϔομͷৄࡉͳಈ͖: Keep-Alive, Range, Cache-Control ... • CGI ಈ࡞ͷΈ: CGI ͲͷΑ͏ʹͯ͠ಈ࡞͍ͯ͠Δͷ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 18
EX1. HTTP αʔόͷࣗ࡞ • HTTP ͘ΘΕ͍ͯΔͷͰຊʹਖ਼͘͠ཧղͰ͖͍ͯΔͱศར • ҙ֎ͱͲ͏͍͏ϓϩτίϧɾ࣮ʹͳ͍ͬͯΔͷ͔͔Βͳ͍ਓଟ͍ • ࣗͰ࡞ͬͨ
HTTP αʔόͰϒϥβ͔Β HTML ͕ݟΕΔͱײಈ • ΠϯϑϥΤϯδχΞ͚ͩͰͳ͘ΞϓϦΤϯδχΞʹΦεεϝ • ύϑΥʔϚϯεΛҙࣝͨ͠ίʔυɾHTTP ͷσόοάͳͲʹඇৗʹཱͭ • ࠷ۙຊ͕ग़͍ͯͨͷͰࢀߟʹ͢Δͱྑͦ͞͏ • ʰWebαʔόΛ࡞Γͳ͕ΒֶͿ جૅ͔ΒͷWebΞϓϦέʔγϣϯ։ൃೖʱ 2 2 h$p:/ /d.hatena.ne.jp/kmaebashi/20160605/p1 July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 19
EX2. Linux ίϯςφΤϯδϯͷࣗ࡞ • Linux ͷίϯςφΤϯδϯΛࣗ࡞ͯ͠ΈΔ • Docker ͳͲͰίϯςφٕज़͕ҰൠԽ͖ͯͨ͠ •
Docker ඇৗʹڊେͳͷͰಈ͖͕͔ΓͮΒ͍͜ͱଟ͍ • ࣮͢Δ͜ͱͰதͰͲͷΑ͏ͳಈ͖ʹͳ͍ͬͯΔ͔ཧղͰ͖Δ • cgroup chroot, veth ͷΑ͏ͳٕज़ཧղͰ͖Δ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 20
EX2. Linux ίϯςφΤϯδϯͷࣗ࡞ • ͜Ε͍͔͠ͱࢥ͍͖ಈ͔͚ͩ͢ͳΒҙ֎ͱ؆୯ • h#ps:/ /github.com/kazuho/jailing 200
ߦఔͷ Perl εΫϦϓτ • Linux ίϯςφࣗମେମ 10 લ͙Β͍͔Β͋Δ • ࣮ͯ͠ΈΔͱ Docker Կ͕ಛผͩͬͨͷ͔͔Δ • ٯʹ Docker ԿΛ٘ਜ਼ʹͨ͠ͷ͔͔Δ • ίϯςφΤϯδϯͷࣗ࡞Λ͍ͯ͠Δਓ݁ߏ͍ΔͷͰࢀߟʹ͢Δͱྑͦ͞͏ • h#ps:/ /github.com/yuuki/droot h#ps:/ /github.com/haconiwa ͳͲ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 21
ͦͷଞͷྫ • ݴޠॲཧܥΛ࡞ͬͯΈΔ • ϓϩϏδϣχϯάπʔϧΛ࡞ͬͯΈΔ • ϩάΠϯೝূαʔόΛ࡞ͬͯΈΔ • ࢹαʔόΛ࡞ͬͯΈΔ •
ࢄγεςϜͷΞϧΰϦζϜΛ࣮ͯ͠ΈΔ • ... July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 22
ंྠͷ࠶ൃ໌ͰಘΒΕΔ • ϓϩτίϧɾϨΠϠͳͲͷීวతͰ͑͘Δٕज़ΛޮΑֶ͘Δ • ࣅͨͷΛ࡞ΔͷͰݩͷιʔείʔυΛඞવతʹಡΉ͜ͱ͕૿͑Δ • ଞऀͷιʔείʔυΛେྔʹಡΉ͜ͱϓϩάϥϛϯά্ୡͷํ๏ͷҰͭ • Apache, Nginx,
Docker(libcontainer) ͷιʔεʹ׳ΕΔࣄ͕ग़དྷΔ • Կ͔τϥϒϧ͕͋ͬͨ࣌ʹιʔείʔυϨϕϧͰಈ࡞Λ͑Δ • RFC ͳͲͷ͔ͬ͠Γ༷ͨ͠ΛݩʹιʔεΛॻ͘ܦݧ͕ग़དྷΔ • ৽͍༷͕͠ެ։͞Εͨ࣌ͳͲʹ RFC ΛಡΈղ͘࿅शʹͳΔ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 23
Lv3: දతϓϩμΫτ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota
( @rrreeeyyy ) / Topotal 24
දతϓϩμΫτ 3 ʮΤϯδχΞͰ͋Ε୭Ͱͦ͏Ͱ͋ΔΑ͏ʹʯͱ͍͑Δ͜ͱͳͷ͔Ͳ͏͔Θ͔ Βͳ͍͕ɺʮ◦◦͞Μͱ͍͑□□Ͱ༗໊ʯͱ͍ΘΕΔΑ͏ͳɺ͜͜Ͱ͍͏ʮදతϓ ϩμΫτʯΛ࣋ͭ͜ͱɺগͳ͘ͱʹͱͬͯಌΕΔͱ͜Ζͷେ͖͍ͷͩɻ ʮදతϓϩμΫτʯͱݺΕΔʹͲ͏͍͕ͬͨ݅ඞཁͳͷͩΖ͏͔ɻҎԼͷ4 ͙ͭΒ͍͕͙͢ʹࢥ͍ු͔ͿɻͦΕͳΓͷنͷͷɺ͘ΘΕΔͷɺٕज़త ৽نੑͷ͋Δͷɺ࡞ऀݸਓΛڧ͘ىͤ͞Δͷɻ্ه4ͭΛඞͣͯ͢͠ຬͨ ͍ͯ͠Δඞཁͳ͍͔͠Εͳ͍͕ɺຬ͍ͨͯ͠Δํ͕ΑΓʮදੑʯ͕ߴ͔Ζ͏ ͜ͱ͕૾Ͱ͖Δɻ
3 h$p:/ /kentaro.tumblr.com/post/66674445339/දతϓϩμΫτʹ͍ͭͯ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 25
ंྠͷ࠶ൃ໌ + ΞΠσΞ = දతϓϩμΫτ? • ंྠͷ࠶ൃ໌ࣗͷΞΠσΞΛՃ͑ΔࣄͰൃ໌ͨΓ͑Δ • ࡞ͬͨιϑτΣΞʹݩͷιϑτΣΞͱͷࠩΛՃ͑Δ •
ex. طଘͷιϑτΣΞͷෆຬΛղܾ͍ͯ͠Δ • ex. σϓϩΠӡ༻͕طଘͷιϑτΣΞΑΓ؆୯ʹͳ͍ͬͯΔ • Ճ͑Δ͖ΞΠσΞ࡞͍ͬͯΔ͏ͪʹݟ͑ͯ͘Δ͜ͱଟ͍ • ंྠͷ࠶ൃ໌Λ͍ͯ͠Δ͏ͪʹରυϝΠϯͷਂ͍͕ࣝಘΒΕΔͨΊ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 26
ंྠͷ࠶ൃ໌ + ΞΠσΞͷྫ • நԽ͗ͣ͢͠ಛఆͷنɾυϝΠϯΛରʹಛԽͯ͠ΈΔ • ࣗͷ৫ͷنʹඞཁͳ͚ͩநԽ͢ΔΑ͏ʹ͢Δ • ॻ͖͢ͳΒ "ͲͷݴޠͰॻ͖͢ͷ͔ʁ"
݁ߏॏཁ • ݴޠͷಛੑ͝ͱʹ͍ͯΔɾ͍͍ͯͳ͍͕͋Δ • ϫϯόΠφϦͰσϓϩΠ͍ͨ͠ʁDSL Λ࡞Γ͍ͨʁ • ϢʔβΠϯλϑΣʔεͷߟ͑ํ݁ߏॏཁ • Ͳ͏͍͏ઃఆϑΝΠϧʹ͢Δ͔ʁఆӡ༻ϑϩʔͲ͏͢Δ͔ʁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 27
ंྠͷ࠶ൃ໌ + ΞΠσΞͷྫ • Linux ίϯςφΤϯδϯෳࡶ͗͢Δ͜ͱ͕ଟ͍ • ࣗͷ৫ͷنʹ࠷దԽͨ͠෦ͷΈΛ࣮͢Δํ 4 •
طଘͷπʔϧΛ Go ݴޠͰॻ͖͢ • ϫϯόΠφϦͰಈ͘ͷͰΫϥΠΞϯτπʔϧͳΒಋೖোน͕Լ͕Δ • ฒྻॲཧ͕࣮͍͢͠ͷͰ໘ͰͷརಘΒΕΔՄೳੑ͕͋Δ • ઃఆϑΝΠϧࣗಈԽ͕͍͠πʔϧΛ CRuby/mruby ͳͲͷݴޠͰ࣮ͯ͠ΈΔ • DSL ࡞Γ͘͢ Web ΤϯδχΞΑ͘͏ݴޠͳͷͰड͚ೖΕΒΕ͘͢ͳΔ 4 h$p:/ /blog.yuuk.io/entry/diy-container July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 28
ൃ໌Ξϯνύλʔϯ(ݏΘΕΔंྠͷ࠶ൃ໌)ͷྫ • طଘͷͷྼԽΛ࡞ͬͯϓϩμΫγϣϯʹೖΕͯ͠·͏ • ϓϩμΫγϣϯʹೖΕΔͳΒطଘͷͱͷࠩԿ͔ʁΛͪΌΜͱҙࣝ͢Δ • ͪΌΜͱઆ໌ग़དྷΔΑ͏ʹ͓ͯ͘͠ • υΩϡϝϯτͳͲͰͪΌΜͱ͢Α͏ʹ͓ͯ͘͠ •
طଘͷͷमਖ਼ͰेࡁΉͷʹ৽͍͠Λ࡞ͬͯಋೖͯ͠͠·͏ • ಋೖࡁΈͷͷͰमਖ਼ͰࡁΉͳΒमਖ਼͠·͠ΐ͏ • → ࣗͷൃ໌ʹ͢Δʹ࡞Ζ͏ͱ͍ͯ͠ΔରྖҬͷਂ͍ݟ͕ඞཁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 29
·ͱΊ • ίʔσΟϯάͷ࿅शͷखஈͱͯ͠ंྠͷ࠶ൃ໌Λհ • ϨΠϠɾϓϩτίϧͷཧղɾϓϩάϥϛϯάͷྑ͍࿅शʹͳΔ • ंྠͷ࠶ൃ໌͔ΒֶΔࣄʹ͍ͭͯྫΛަ͑ͯհ • ϨΠϠɾϓϩτίϧͳͲͷਂ͍ཧղ •
༷࣮ࡍͷڍಈ͔Β࣮·Ͱམͱ͠ࠐΊΔ࣮ྗ • ࣗͷυϝΠϯͰͷࣝɾܦݧΛՃ͑ΔࣄͰදతϓϩμΫτʹͳΓ͑Δ • ͥͻ JTF2016 ͷςʔϚͰ͋Δ "ͬͯΈͨ" ଆʹͳͬͯΈ͍ͯͩ͘͞ • Shut the fuck up and write some code! July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 30
Any ques)ons? July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota
( @rrreeeyyy ) / Topotal 31
ࢀߟࢿྉ • https://speakerdeck.com/mizzy/serverspec-at-jtf2014 • http://d.hatena.ne.jp/kmaebashi/20160605/p1 • https://github.com/kazuho/jailing • https://github.com/yuuki/droot •
https://github.com/haconiwa/haconiwa • http://blog.yuuk.io/entry/diy-container • http://kentaro.tumblr.com/post/66674445339/දతϓϩμΫτʹ͍ͭͯ • https://github.com/peco/peco July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 32
࣭ٙԠ༻εϥΠυ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota (
@rrreeeyyy ) / Topotal 33
Ϟνϕʔγϣϯͷҡ࣋ • ंྠͷ࠶ൃ໌ͰϞνϕʔγϣϯ͕ଓ͔ͳ͍ʁ • Ϟνϕʔγϣϯͷҡ࣋ਓͦΕͧΕΓํ͕ҧ͏ • ͷΛ࡞ͬͯಈ͔͢͜ͱࣗମʹָ͠ΈΛײ͡Δਓ • ंྠͷ࠶ൃ໌݁ߏ͍ͯΔ͔ʁ •
දతϓϩμΫτΛ࡞Δ͜ͱʹເΛײ͡Δਓ • ंྠͷ࠶ൃ໌݁ߏ͍ͯΔ͔ʁ • ࣗͷͨ͠ܦݧɾ࣋ͬͯΔࣝΛөͰ͖Δ͔࣍ୈ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 34
࡞Βͳ͔ͯ͘Δͱ͍͏ਓͲ͏͢Εʁ • ͪΖΜͦͷ௨Γ • શͯͷษڧ͍ͨ͜͠ͱΛ࠶࣮͍ͯͨ͠Β͕࣌ؒΓͳ͍ • ࣗͷ 1 ͭͷಛԽ͍ͨ͠ࣄ߲͙Β͍࣮Λܦݧ͓͖ͯ͘͠ •
࡞Δ͜ͱͰॳΊ͔ͯͬͯ͘Δࣄ͋Δͱࢥ͍ͬͯΔ • ͏ଆ͔Β࡞ΔଆͷసকདྷతʹٻΊΒΕΔͱࢥ͍ͬͯΔ • ࡞Βͳ͔ͯ͘Δ͙Β͍ݡ͍ਓͲΜͲΜ࡞ͬͯެ։͍ͯͩ͘͠͞ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 35
ϨΠϠɾϓϩτίϧͷࣝͳͥॏཁ͔ʁ • ͍ΘΏΔπʔϧͱ͍͏ͷҠΓมΘΓ͕ܹ͍͠ • πʔϧͷ͍ํ͚͍ͩͬͯ͘ͱຊ࣭Λཧղ͢Δલʹ࣌ؒΕʹͳΔ • ͱ͍͑جຊతͳͱ͜Ζಉ͡(ྫ. HTTP ϓϩτίϧ) •
ϓϩτίϧϨΠϠͷࣝීวతʹ͑͘Δ • ϨΠϠͷγεςϜίʔϧͳͲେ͖͘มԽ͢Δ͜ͱগͳ͍ • ϓϩτίϧਐతʹਐԽ͢Δ͜ͱ͋Δ • HTTP 1.0 -> HTTP 1.1 -> HTTP 2.0 • ϓϩτίϧͷ༷ΛಡΉྗɾಡΜͰ࣮͢Δྗ͍ͭͰඞཁ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 36
ंྠͷ࠶ൃ໌ͷ࣌ؒཧʹ͍ͭͯ • Q. • ࠶։ൃ͠Α͏ͱ͢Δͱͣͬͱग़དྷΔ • HTTP ϓϩτίϧશ෦࣮͖͠Δ·Ͱ... • A.
• εϞʔϧΰʔϧΛܾΊΔ • HTTP αʔόͰ͋ΕҰ୴ϒϥβͰݟΕΔ·Ͱ • ͲΜͲΜཁ݅Λ૿͍ͯ͘͠ͷ݁ߏ໘ന͍ • ͭ͗͜ͷϔομ...͜ͷϔομ • ษڧ͍ͨ͠ྖҬʹΑ࣮ͬͯΛ૿͍͚ͯ͠ྑ͍ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 37
Ͳ͏ͬͯࣄʹೖΕΔ͔ • Q. • ͍͟ϓϩμΫγϣϯʹೖΕΔͱ͖Ͳ͏ೖΕ͍͔ͯ͘ʁ • A. • ৫ɾνʔϜͷ߹ҙΛऔ͔ͬͯΒࣄʹೖΕ͍ͯ͘ •
શؔ͘ͳ͍ษڧͷίʔυΛࣄͰͣͬͱॻ͘ͷม • ͜͏͍͏ٕज़͕ඞཁͰษڧ͢Δඞཁ͕͋Δ • ͜͏͍͏πʔϧΛͬͯطଘΑΓ͜͏ྑ͍ͷͰࣄͰॻ͖͍ͨ • ͜Ε͕৫ɾνʔϜͰ߹ҙग़དྷͯॳΊͯࣄͰग़དྷΔͱࢥ͏ • ษڧ͕ग़དྷͨΓଞ࣮ࣾͳͲʹͱΒΘΕͳ͍Ͱग़དྷΔ৫ͩͱ͍͍Ͱ͢Ͷ July Tech Festa 2016 2016/07/24 - Yoshikawa Ryota ( @rrreeeyyy ) / Topotal 38