SlideShare a Scribd company logo
1 of 98
Download to read offline
HTTP/2
https://imququ.com
2008.4 ~ 2011.5
2011.8 ~ 360
360
https://imququ.com
Part I HTTP
Hypertext Transfer Protocol
$> telnet igvita.com 80
Connected to 173.230.151.99
GET /archive
Hypertext delivery with HTTP 0.9! - eom.
(connection closed)
HTTP 0.9 is the ultimate MVP - one line, plain-text
“protocol” to test drive the “www idea”.
HTTP 0.9 1991
/ ASCII
CRLF
HTML
$> telnet ietf.org 80
Connected to 74.125.xxx.xxx
GET /rfc/rfc1945.txt HTTP/1.0
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Accept: */*
HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 137582
Last-Modified: Wed, 1 May 1996 12:45:26 GMT
Server: Apache 0.84
4 years of rapid iteration later… eom.
(connection closed)
HTTP 1.0 is an informational RFC - documents
HTTP 1.0 1996
$> telnet google.com 80
Connected to 74.125.xxx.xxx
GET /index.html HTTP/1.1
Host: website.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)... (snip)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: __qca=P0-800083390... (snip)
HTTP/1.1 200 OK
Connection: keep-alive
Transfer-Encoding: chunked
Server: nginx/1.0.11
Content-Type: text/html; charset=utf-8
Date: Wed, 25 Jul 2012 20:23:35 GMT
Expires: Wed, 25 Jul 2012 20:23:35 GMT
Cache-Control: max-age=0, no-cache
100
<!doctype html>
(snip)
HTTP 1.1 1999
Connection: keep-alive
Transfer-Encoding: chunked
Accept-Ranges
HTTP 1.1 2014
RFC2616 - Hypertext Transfer Protocol -- HTTP/1.1
RFC7230 - HTTP/1.1: Message Syntax and Routing
- low-level message parsing and connection management
RFC7231 - HTTP/1.1: Semantics and Content
- methods, status codes and headers
RFC7232 - HTTP/1.1: Conditional Requests
- e.g., If-Modified-Since
RFC7233 - HTTP/1.1: Range Requests
- getting partial content
RFC7234 - HTTP/1.1: Caching
- browser and intermediary caches
RFC7235 - HTTP/1.1: Authentication
- a framework for HTTP authentication
✗
✔
SPDY ? 2012 - 2015
Part II HTTP/1
Web ...
Web Web
SPA
HttpArchive
Web ...
~2000 KB

~100
~17
~50
● Cable profile (5Mbps / 28 ms RTT)
● Main thread attributionin Blink
o Measured via Telemetry
● 69.5% of time blocked on network
● 6.6% of time blocked JavaScript
● 5.1% blocked on Layout
● 4.5% blocked on Paint
● ...
No surprises here... First page load is
network (latency) bound!
TOP 1M Alexa Sites
HTTP -
TCP
/
Keep-Alive
TCP
✗
Pipelining
RFC2616 2 RFC7230
6
• Batch Ajax Request
• CSS Sprite
• CSS JS Concatenation
• CSS JS Inline
• Data URI
• ... ...
TCP /
- TCP 6
- DNS TCP TCP
-
-
HTTP
-
- Cookie-Less
- CSS JS
-
HTTP/1
HTTP/1
HTTP/2
Part III HTTP2
HTTP/2
RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2)
RFC 7541 - HPACK: Header Compression for HTTP/2
HTTP/2
TCP
=> Stream
- Multiplexed
- Prioritized
- Prioritization
- Flow control
- Server Push
Header Compression HPACK
=>
=>
Server Push
ClientServer
PUSH_PROMISE
HPACK header compression
● Literal values are (optionally) encoded with a static Huffman code
● Previously sent values are (optionally) indexed
○ e.g. “2” in above example expands to “method: GET”
HTTP/1
↓~54%
↓~90%
Part IV HTTP2
Web Server
>>
CanIUse
*Only Win10
HTTP/2
HTTP/2
H2C HTTP/2 Cleartext
Firefox Chrome Safari IE Edge
H2C
Chrome HTTPS
2015 8 Chrome HTTPS 63%
HTTPS
HTTP
Chrome HTTPS API
ALPN
HTTP/2
HTTP/2
Chrome
FireFox
HTTP/2
HTTP/2
HTTP/2
chrome://net-internals
Wireshark
HTTP/1 HTTP/2
>>
>>
Part V HTTP2
Is TLS Fast Yet?
https://istlsfastyet.com/
iana
RSA cloudflare
ECDHE cloudflare
TLS
TLS Caching
TLS Tickets
TLS Tickets
TLS
TLS False Start
TLS
ECC
ECC Elliptic Curve Cryptography
256 ECC Key 3072 RSA Key
OCSP Online Certificate Status Protocol
HSTS HTTP Strict Transport Security
strict-transport-security: max-age=16070400; includeSubDomains
SSL OpenSSL LibreSSL BoringSSL
- PC AES-GCM AES-NI CPU
- ChaCha20-Poly1305 ARM CPU
>>
TLS
HTTP/2
DNS
•
• dns-prefetch
•
CDN
•
• JS CSS HTML
• PngOut PngCrush JpegOptim GifSicle
• GZip
HTTP
• Expires / Cache-Control Last-Modified / ETag
HTTP/2
- HTTP/2 TCP
- TCP CPU
- HTTP/2
- HTTP/2 TCP
-
- CPU
- HTTP/2 Server Push
-
-
HTTP/2
- IP
-
Server Push
- Cookie
- Cookie Push
Part VI HTTP2
HTTP/2
Pangolin H2C WEB
Web Server
Server Push
HTTP/2
10
HTTP/1.1 HTTP/2 Web
TCP
TCP Head of Line Blocking
TCP
HTTP/2
TCP
Google QUIC Quick UDP Internet Connections
QUIC
QUIC UDP TCP+TLS+SPDY
&&
Web
- Ilya Grigorik
-
HTTP
- David Gourley Brian Totty Marjorie Sayer Sailu Reddy Anshu Aggarwal
-
HTTP-2 is here, let's optimize!
- Velocity SC 2015
- Ilya Grigorik
Nginx/H2O HTTP/2
Wireshark HTTP/2
HTTP/2
BoringSSL HTTPS
H2O Cache-Aware Server Push
TLS
HTTP/2
... ...
https://imququ.com
Thank You!
Q & A
quguangyu@gmail.com

More Related Content

What's hot

Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1
PacSecJP
 

What's hot (20)

HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30
 
HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and Why
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
HTTP/2: What no one is telling you
HTTP/2: What no one is telling youHTTP/2: What no one is telling you
HTTP/2: What no one is telling you
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know?
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
 
Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
 
SPDY and HTTP/2
SPDY and HTTP/2SPDY and HTTP/2
SPDY and HTTP/2
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
HTTP2 is Here!
HTTP2 is Here!HTTP2 is Here!
HTTP2 is Here!
 
Introduction to Haproxy
Introduction to HaproxyIntroduction to Haproxy
Introduction to Haproxy
 
Developing the fastest HTTP/2 server
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 server
 
So that was HTTP/2, what's next?
So that was HTTP/2, what's next?So that was HTTP/2, what's next?
So that was HTTP/2, what's next?
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and Beyond
 
Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1Stuart Larsen, attacking http2implementations-rev1
Stuart Larsen, attacking http2implementations-rev1
 

Similar to HTTP2:新的机遇与挑战

Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атакСтек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Positive Hack Days
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
Farooq Khan
 

Similar to HTTP2:新的机遇与挑战 (20)

Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
HTTP
HTTPHTTP
HTTP
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Attacking http2 implementations (1)
Attacking http2 implementations (1)Attacking http2 implementations (1)
Attacking http2 implementations (1)
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.
 
Http2
Http2Http2
Http2
 
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атакСтек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
 
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICA new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHA New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOH
 
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
 
Http request&response
Http request&responseHttp request&response
Http request&response
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
 
Http2 Security Perspective
Http2 Security PerspectiveHttp2 Security Perspective
Http2 Security Perspective
 
Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using ruby
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

HTTP2:新的机遇与挑战