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
HTTP/2 最速実装 v3
Search
Ryo Okubo
September 06, 2014
Programming
4
4.6k
HTTP/2 最速実装 v3
Ryo Okubo
September 06, 2014
Tweet
Share
More Decks by Ryo Okubo
See All by Ryo Okubo
メルカリ・メルペイの成長を支える データ基盤とはどんなものか
syucream
7
6.7k
バッチとストリーミング、それぞれの障害に立ち向かう
syucream
3
3.5k
How Scala works at Mercari
syucream
2
1k
Production-ready stream data pipeline in Merpay, Inc
syucream
2
13k
データとML周辺エンジニアリン グを考える会 #2 イントロ
syucream
0
610
マイクロサービスにおける ログ収集の課題と取り組み
syucream
7
2.6k
Stream Data Pipeline for Microservices in Merpay
syucream
6
1.2k
メルペイにおける、マイクロサービスに寄り添うログ収集基盤 / Microservices-frendly Data Pipeline
syucream
0
18k
Merpay のデータ収集基盤
syucream
5
1k
Other Decks in Programming
See All in Programming
return文におけるstd::moveについて
onihusube
1
690
useSyncExternalStoreを使いまくる
ssssota
6
1k
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
CSC509 Lecture 14
javiergs
PRO
0
130
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
630
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Building Your Own Lightsaber
phodgson
103
6.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Being A Developer After 40
akosma
87
590k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
How GitHub (no longer) Works
holman
311
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
)551࠷࣮W IUUQESBGUରԠ൛ !TZV@DSFBN
࣍ w )551ͷ؆୯ͳઆ໌ w )551Yͷ͓͞Β͍ w )551ͷಛ w )551࠷࣮ͷղઆ w
࠷ݶߦ͏͖࣮ʹ͍ͭͯ w ಈ࡞֬ೝํ๏ w ֤छࢿྉ
)551ͷ ؆୯ͳઆ໌
)551YͷϦΫΤετ w ݪଇDPOOFDUJPOSFRVFTU w Ұൠతͳϒϥβಉ࣌ʹίωΫγϣϯ͔͠։͔ͳ͍
)551ͷ1JQFMJOJOH w ίωΫγϣϯͰෳϦΫΤετΛ͛ΒΕΔ w ͨͩ͠ॱংΛकΒͳ͚ΕͳΒͳ͍ w ͜ͷ੍ͷͨΊϨεϙϯε͕ϒϩοΫ͢ΔةݥੑΞϦ )FBEPG-JOF#MPDLJOH server client
1 1.,GET,/hoge.gif 2.,GET,/fuga.html 3.,GET,/piyo.css
)551Yͷϔομ w ςΩετͰϔομΛΓऔΓ w ϔομͱϘσΟͷ۠Γۭվߦ w 6TFS"HBOUͳͲ΄ͱΜͲมΘΒͳ͍ͷʹԿૹ৴͢Δඞཁ͕͋Γɺ (&5)551 )PTUMPDBMIPTU "DDFQU
$3 -' )5510, 4FSWFSOHJOY %BUF'SJ 4FQ(.5 $POUFOU5ZQFUFYUIUNM $POUFOU-FOHUI -BTU.PEJpFE'SJ 4FQ(.5 $POOFDUJPOLFFQBMJWF &5BHBGF "DDFQU3BOHFTCZUFT $3 -' ϦΫΤετϔομͷྫ Ϩεϙϯεϔομͷྫ
)551ͷಛ w ཧతͳίωΫγϣϯ ετϦʔϜ ʹΑΔฒྻ௨৴ w ݪଇతʹίωΫγϣϯຊ͚ͩுΔ w ϝοηʔδΛόΠφϦϑϨʔϜͰදݱ w
ϔομΛಠࣗͷܗࣜͰѹॖ )1"$, w αʔό͔Βͷࣗൃతͳ௨৴ αʔόϓογϡ w ετϦʔϜͷ༏ઌ͚
ετϦʔϜ w ͭͷίωΫγϣϯ͚ͩுΓɺͦͷ্ͰετϦʔϜΛ։͘ w )551௨৴ετϦʔϜ্ͰߦΘΕΔ w ετϦʔϜͷॲཧϒϩοΫ͠߹Θͳ͍ w ετϦʔϜʹҰҙͳ*%͕ৼΒΕΔ w
ΫϥΠΞϯτ͔Β։͘߹حɺαʔό͔Β։͘߹ۮΛ༻ w 4USFBN*%ཧ༻ʹ༻͞ΕΔ server client TCP HTTP/2 HTTP/20 HTTP/20
όΠφϦϑϨʔϜ w ϝοηʔδΛόΠφϦͷʮϑϨʔϜʯͰදݱ w ϑϨʔϜʹϔομ͕༩͞ΕΔ w ϑϨʔϜɺλΠϓɺϑϥάɺετϦʔϜ*% w ϑϨʔϜͷϑΥʔϚοτԼهͷ௨Γ
ϑϨʔϜλΠϓ w ϑϨʔϜ༻్ʹԠͯ͡Լهͷ༷ʹྨ͞ΕΔ w %"5" ϘσΟΛදݱ w )&"%&34 ϔομΛදݱ
w 13*03*5: ετϦʔϜͷ༏ઌઃఆ w 345@453&". ετϦʔϜΛҟৗऴྃ w 4&55*/(4 ίωΫγϣϯͷઃఆ w 164)@130.*4& αʔόϓογϡͷ௨ w 1*/( ίωΫγϣϯͷࢮ׆֬ೝ w (0"8": ίωΫγϣϯͷऴྃ௨ w 8*/%08@61%"5& ϑϩʔ੍ޚ w $0/5*/6"5*0/ )&"%&34ʹೲ·Βͳ͍ͷϔομͷૹ৴
ϔομѹॖ w )1"$,ͱ͍͏ܗࣜͰѹॖ͞ΕΔ w IUUQUPPMTJFUGPSHIUNMESBGUJFUGIUUQCJTIFBEFS DPNQSFTTJPO w ѹॖํ๏ w ϔομͷ໊લΛϋϑϚϯූ߸Խ
w Α͘ΘΕΔϔομͷηοτΛJOEFYͰࢦఆ w ҎલૹͬͨϔομΛJOEFYͰࢦఆ
)551࠷࣮ͷ ղઆ
)551࠷࣮ͱ w )551Yͱ͕ࠩଟ͍ w ਅ໘ʹ࣮͍ͯ͠Δͱ͕͔͔࣌ؒΔʜ w ࠷ݶϦΫΤετ͕ॲཧ͞ΕΔͱ͜Ζ·ͰΛ࣮͠Α͏ʂ w IUUQTHJUIVCDPNIUUQKQIUUQKQHJUIVCJPXJLJ)551 &$&'&"&'
&"&# w ΫϥΠΞϯτ͔Β࣮ͨ͠ํָ͕ w ຊࢿྉΫϥΠΞϯτͷ࣮Λఆͯ͠࡞͍ͯ͠·͢
࠷࣮ͰΔ͖ൣғ w όΠφϦϑϨʔϜॲཧ w ಛఆछྨͷϑϨʔϜ͚ͩΓ·͢ w %"5" )&"%&34 4&55*/(4 (0"8":
w ετϦʔϜཧ w αϘΓ·͢ɻTUSFBNJE͚ͩΛ༻ w ঢ়ଶཧ͠ͳ͍ɻ͋ΔॱংͰϑϨʔϜ͕དྷΔ͜ͱΛఆɻ w ϔομѹॖ w αϘΓ·͢ɻFODPEF͚ͩ)1"$,ͷϑΥʔϚοτʹͳΔ͘߹Θͤ·͢ɻ
࠷࣮ʹΑΔ ΫϥΠΞϯταʔόͷΓऔΓ server client 0.,$"& % 1.,Connec0on,Preface( 24,octets,), 2.,
,SETTINGS,frame, 3.,SETTINGS,frame ACK 5.,HEADERS,frame ! 6.,HEADERS,frame,(#%) 7.,DATA,frame,(#%) 8.,GOAWAY,frame, 4.,ACK
ϓϩτίϧ ωΰγΤʔγϣϯ w )551Λ͏ࣄΛDMJFOUTFSWFSؒͰͲ͏ܾఆ͢Δ͔ʁ w ਅ໘ʹΔ߹ w IUUQTͳΒ5-4/1/PS5-4"-1/ w IUUQͳΒ6QHSBEF
"MU4WD w ࠷࣮Ͱ%JSFDU ωΰγΤʔγϣϯ͠ͳ͍ Ͱߦ͖·͢ w ૬ख͕)551͠ΌΕΔఆͰ௨৴
$POOFDUJPO1SFGBDF w )551ηογϣϯ։࢝࣌ʹΦΫςοτͷจࣈྻΛૹ৴ w 13* )551aSaOaSaO4.aSaOaSaOz w )551YͰl13*ϝιου͕དྷͨzͱղऍ͞ΕΔ w )551͠ΌΕͳ͍αʔόʹૣظʹηογϣϯΛͬͯ͑Δ
! w ࢀߟIUUQTVNNFSXJOEKQEPDTESBGUJFUGIUUQCJTIUUQ TFDUJPO
4&55*/(4GSBNF w ίωΫγϣϯશମʹؔΘΔઃఆΛΓऔΓ͢Δ w αʔόϓογϡڐՄɺಉ࣌ετϦʔϜͷ࠷େͳͲ w ϖΠϩʔυۭ ϑϨʔϜͷMFOHUI ͰΑ͍
w ϖΠϩʔυͷϑΥʔϚοτԼهͷ௨Γ ! w ࢀߟIUUQTVNNFSXJOEKQEPDTESBGUJFUGIUUQCJTIUUQTFDUJPO
4&55*/(4GSBNF "$, w 4&55*/(4डऔଆ"$,Λฦ͢ඞཁ͕͋Δ w ϑϨʔϜϔομͷϑϥάͰYΛཱͯΔ w ϖΠϩʔυۭʹ͢Δ !
w ࢀߟIUUQTVNNFSXJOEKQEPDTESBGUJFUG IUUQCJTIUUQTFDUJPO
)&"%&34 ϦΫΤετ w ϦΫΤετϔομΛૹ৴ w )FBEFS#MPDL'SBHNFOUҎ֎ҙ w )FBEFS#MPDL'SBHNFOU)1"$,ͷܗࣜʹΤϯίʔυ͢Δ ޙड़
! w ࢀߟIUUQTVNNFSXJOEKQEPDTESBGUJFUGIUUQCJTIUUQTFDUJPO
)1"$, w )551ͷϔομѹॖܗࣜ w IUUQUPPMTJFUGPSHIUNMESBGUJFUGIUUQCJTIFBEFS DPNQSFTTJPO w ࠷࣮Ͱ-JUFSBM)FBEFS'JFMEXJUIPVU*OEFYJOHΛ༻ w ϋϑϚϯූ߸ԽɺΠϯσΫγϯάΛߦΘͳ͍
w ඞਢͷϔομ͕͋ΔͷͰͦΕؚ·ͤΔ͜ͱ w ϦΫΤετͰNFUIPE TDIFNF BVUIPSJUZ QBUI w ϨεϙϯεͰTUBUVT
)1"$,ΤϯίʔυͷΠϝʔδ w ϑΥʔϚοτࠨԼͷਤͷ௨Γ w )ϋϑϚϯූ߸Խϑϥάɻʹ͓ͯ͘͠ w -FOHUIͷ ҙɻࠓճϏοτʹೲ·ΔఆͰ࣮ɻ w
ਅ໘ʹ࣮͢ΔͳΒ*OUFHFS3FQSFTFOUBUJPOΛࢀর w 4USJOHͷ෦"4$**ίʔυΛೖΕΔ w /BNF͕lNFUIPEzɺ7BMVF͕l(&5zͷ߹ɺӈͷΠϝʔδͷΑ͏ʹ͢Δ -JUFSBM)FBEFS'JFMEXJUIPVU*OEFYJOHϑΥʔϚοτ cccccc ccc clNFUIPEzc ccc cl(&5zc ΤϯίʔυޙͷΠϝʔδ 4USJOH෦࣮ࡍʹจࣈྻͷPDUFUΛ༻
)&"%&34 Ϩεϙϯε w ϨεϙϯεϔομΛड৴ w ϖΠϩʔυ)1"$,ͷΤϯίʔυͱٯͷ࣮Λॻ͚0, w ͨͩ͠૬ख͕ϋϑϚϯූ߸ɺΠϯσΫγϯάͯ͘͠ΔՄೳੑ͋Γ w ࠷Ͱ࣮ΛαϘΓ·͠ΐ͏X
w ϑϨʔϜͷ-FOHUI͚ͩόοϑΝΛಡΈඈͦ͏ɻɻɻ w ༨༟͕͋Ε࣮ͯ͠Έ͍ͯͩ͘͞
%"5" Ϩεϙϯε w ϨεϙϯεϘσΟΛड৴ w ϖΠϩʔυ%BUB ͷ෦͚ͩΛఆ w όοϑΝΛͻͨ͢ΒಡΈग़͚ͩ͢Ͱ0, w
ϨεϙϯεϘσΟ͕ςΩετͳΒɺͦͷ··ग़ྗͯ͠ΈΑ͏ʂ
(0"8": w ηογϣϯऴྃΛ௨͢Δ w -BTU4USFBN*%ɺ&SSPS$PEF w "EEJUJJPOBM%FCVH%BUBෆཁ ! w ࢀߟIUUQTVNNFSXJOEKQEPDTESBGUJFUGIUUQCJTIUUQ
TFDUJPO
͜͜·ͰͰ͖Ε࠷࣮ ྃͰ͢ ͓ർΕ͞·Ͱͨ͠
ಈ࡞֬ೝํ๏ w ΫϥΠΞϯτΛ࣮͢Δ߹ w 1VCMJD5FTU4FSWFSΛ͏ w IUUQTOHIUUQPSH w OHIUUQEΛ͏ %PDLFSJNBHF༻ҙ͠·ͨ͠
w ࠷࣮αʔόΛ͏ w αʔόΛ࣮͢Δ߹ w OHIUUQ ΫϥΠΞϯτ࣮ Λ͏ %PDLFSJNBHF༻ҙ͠·ͨ͠ w ࠷࣮ΫϥΠΞϯτΛ͏
OHIUUQ༻%PDLFSJNBHF w OHIUUQ͑Δ%PDLFSJNBHF༻ҙ͠·ͨ͠ w ༻ํ๏ w EPDLFSQVMMTZVDSFBNOHIUUQI w EPDLFSSVOJQUTZVDSFBN OHIUUQICJOCBTI
w ίϯςφ OHIUUQEWOPUMT
࠷࣮ྫ w ࠷࣮ͯ͠Έ·ͨ͠ɻࢀߟʹ͍ͯͩ͘͠͞ɻ w IUUQTHJUIVCDPNTZVDSFBN .JOJNVN)551
ࢀߟࢿྉ w IUUQESBGUຊޠ༁ w IUUQTVNNFSXJOEKQEPDTESBGUJFUGIUUQCJTIUUQ w )1"$,ESBGU w IUUQUPPMTJFUGPSHIUNMESBGUJFUGIUUQCJTIFBEFS DPNQSFTTJPO
w )551ϋοΧιϯୈҰճɺୈೋճͷࢿྉ w IUUQXXXTMJEFTIBSFOFU,BPSV.BFEBIUUQTJNQMF w IUUQXXXTMJEFTIBSFOFU:PTIJIJSP*XBOBHBIUUQ
ൃల՝ w ࠷࣮͕ऴΘͬͨΒԼهઓͯ͠ΈͯԼ͍͞ w )1"$,FODPEFSEFDPEFSϑϧ࣮ w ετϦʔϜͷঢ়ଶཧ w ଞλΠϓͷϑϨʔϜॲཧ࣮