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
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
8
1.8k
Security_for_introducing_eBPF
kentatada
0
110
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
120
MCP with Cloudflare Workers
yusukebe
2
220
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
350
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
910
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
950
php-conference-japan-2024
tasuku43
0
350
useSyncExternalStoreを使いまくる
ssssota
6
1.3k
ドメインイベント増えすぎ問題
h0r15h0
2
400
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
YesSQL, Process and Tooling at Scale
rocio
169
14k
What's in a price? How to price your products and services
michaelherold
243
12k
Automating Front-end Workflow
addyosmani
1366
200k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Building Applications with DynamoDB
mza
91
6.1k
Unsuck your backbone
ammeep
669
57k
Being A Developer After 40
akosma
87
590k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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 ଞλΠϓͷϑϨʔϜॲཧ࣮