SlideShare a Scribd company logo
HTTP/2
Sudarshan Pant
Mokpo National University
History of HTTP
HTTP/0.9
1991
HTTP/1.0 HTTP/1.1
1996 1999
HTTP/2
2015
Limitations of HTTP/1.1
Simple and text based.
Concurrent Connection Limit
Head-of-line blocking
Unable to use TCP at it’s full capability
Latency
Limitations of HTTP/1.1
HTTP/1.1 RFC states that there should be only 2 concurrent
connections per server/proxy.
Maximum Concurrent connections supported by browsers:
Chrome: 6
IE: 8
Firefox: 6
Opera: 6
Safari: 4
Optimization with HTTP/1.1
■ HTTP/1.1 defines Pipelining but most Browsers do not implement it.
■ Pipelining -> Multiple requests can be sent concurrently but still the responses are sent in
the same order as the requests are made.
PIPELINING
Optimization with HTTP/1.1
■ Use multiple sub-domains to get more connections
■ For example : sub-1.example.com, sub-2.example.com, sub-3.example.com etc.
■ Complicates architecture
DOMAIN SHARDING
Optimization with HTTP/1.1
■ Combine resources into a single larger resource
■ Example, bundling of CSS and javascript,use of image sprites.
■ Inlining:Requests are reduced by using inline styles in HTML instead of writing in separate
files.
CONCATENATION AND INLINING
More problems…
■ Complexity in Web design and maintenance increases.
■ Increased resource consumption.
■ Reduces cacheability of resources.
■ Duplicate resources
SPDY
■ Experimental protocol, developed at Google and announced in mid-2009 with goals.
- Target a 50% reduction in page load time(PLT)
- Avoid the need for any changes to content by website authors.
- Minimize deployment complexity.
- Avoid change in network infrastructure
- Implement in partnership with open-source community.
SPDY
Make more efficient use of the underlying TCP connection by
introducing a new binary framing layer to enable request and
response multiplexing, prioritization, and header compression.
HTTP and SPDY evolution
HTTP/0.9
1991
HTTP/1.0 HTTP/1.1
1996 1999
HTTP/2 Approved
2015
SPDY
Implemented
2012
End of SPDY
2016
■ July 2012 – development of SPDY announced publicly by group of developers at Google.
■ All Major browsers started implementing SPDY which started in the path of standardization.
■ February 2015, Google announced removal of support for SPDY
■ February 2016, Google announced that Chrome will no longer support SPDY after May 15, 2016
HTTP/2 first draft
2012
SPIDY
Development
2009
Beginning of HTTP/2.0
■ March 2012 : Call for Proposal for HTTP/2
■ November 2012: First Draft of HTTP/2 (Based on SPDY)
■ August 2014: HTTP/2 draft-17 and HPACL draft-12 are published
■ February2015: IESG approved HTTP/2 and HPACK drafts
■ May 2015: RFC 7540 (HTTP/2) and RFC 7541 (HPACK) are published.
New in HTTP/2
■ Reduce latency by introducing Header Field Compression
■ Allow multiple concurrent exchanges on the same connection.
■ Server Push
Protocol Overview
Supports all core features of HTTP/1.1
■ HTTP/2 uses the same “http” and “https” URI schemes as HTTP/1.1
■ HTTP/2 uses same default port numbers as HTTP/1.1 (80 for http and 443 for
https)
■ HTTP Semantics, such as verbs, methods, and headers are unaffected.
Binary Framing Layer
HTTP 1.1
POST /upload HTTP/1.1
Host: www.example.com
Content-Type: application/json
Content-Length:15
{“msg”:”hello”}
DATA frame
HEADERS frame
Streams, messages and frames
•Stream: A bidirectional flow of bytes within an established connection, which may
carry one or more messages.
•Message: A complete sequence of frames that map to a logical request or response
message.
•Frame: The smallest unit of communication in HTTP/2, each containing a frame
header, which at a minimum identifies the stream to which the frame belongs.
Connection
Request and Response Multiplexing
HTTP/2.2 enables full multiplexing by allowing the client and server
to break down HTTP messages into independent frames, interleave them
and them reassemble them on the other end.
https://developers.google.com/web/fundamentals/performance/http2/
Stream prioritization
• Each stream may be assigned an integer weight between 1-256
• Each stream may be given an explicit dependency on another stream.
https://developers.google.com/web/fundamentals/performance/http2/
One connection per origin
• No Longer needs multiple connections
• Single connection is established between client
and server and multiple streams are exchanged
between them.
• Reduces the memory and processing footprint
along the full connection path.
• Reduces Network latency.
Flow control
• A mechanism to prevent the sender from overwhelming the
receiver with data
• Each receiver may choose to set any window size that it
desires for each stream and the entire connection.
• Window size is defined in SETTINGS frame when connection
is established
• Default size is 65,535 bytes. Max is (2^31 -1) bytes
• Can be maintained using WINDOW_UPDATE frame.
Server Push
• In addition to the response to the original request, the server
can push additional resources to the client, without the client
having to request each one explicitly.
• Push resources can be:
Ø Cached by the client
Ø Reused across different pages
Ø Multiplexed alongside other resources
Ø Prioritized by the server
Ø Declined by the client
Server Push
Image Source: https://developers.google.com/web/fundamentals/performance/http2/
Header Compression
• HPACK header compression reduces size of HTTP/2 header
• Compressed using Huffman encoding, resulting in an average
30% reduction.
• Frequently used headers can be encoded as variable length
integer, opposed to re-sending the whole header every time.
• Faster content delivery due to smaller headers.
Thank you

More Related Content

PPTX
In a HTTP/2 World - DeccanRubyConf 2017
PPTX
Introducing HTTP/2
PPTX
PDF
HTTP/2 standard for video streaming
PPTX
PPTX
Introduction to HTTP/2
PDF
HTTP2 & HPACK #pyfes 2013-11-30
PDF
What HTTP/2.0 Will Do For You
In a HTTP/2 World - DeccanRubyConf 2017
Introducing HTTP/2
HTTP/2 standard for video streaming
Introduction to HTTP/2
HTTP2 & HPACK #pyfes 2013-11-30
What HTTP/2.0 Will Do For You

What's hot (20)

PPTX
Http/2 lightning
PDF
Communicating on the web
PPTX
HTTP/2 Introduction
PDF
HTTP/2 Update - FOSDEM 2016
PDF
HTTP2:新的机遇与挑战
PDF
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
PPTX
Introduction to HTTP/2
PDF
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
PDF
PDF
Http2 right now
PPTX
HTTP Request Smuggling
PDF
Http smuggling 1 200523064027
PPTX
Basics of NGINX
PDF
SPDY and HTTP/2
PDF
HTTP/2 What's inside and Why
PPTX
HTTP/2 for Developers
PPTX
Introduction to HTTP/2
PPTX
Http Protocol
PPTX
What's New in HTTP/2
Http/2 lightning
Communicating on the web
HTTP/2 Introduction
HTTP/2 Update - FOSDEM 2016
HTTP2:新的机遇与挑战
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
Introduction to HTTP/2
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
Http2 right now
HTTP Request Smuggling
Http smuggling 1 200523064027
Basics of NGINX
SPDY and HTTP/2
HTTP/2 What's inside and Why
HTTP/2 for Developers
Introduction to HTTP/2
Http Protocol
What's New in HTTP/2
Ad

Similar to Introduction to HTTP2 (20)

PPTX
PPTX
Next generation web protocols
PDF
A New Internet? Introduction to HTTP/2, QUIC and DOH
PPTX
HTML5, HTTP2, and You 1.1
PPSX
HTTP Presentation
PPTX
The new (is it really ) api stack
PDF
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
PDF
HTTP 2.0 – What do I need to know?
PPTX
PDF
Let's use modern protocols everywhere!
PDF
Enabling Googley microservices with HTTP/2 and gRPC.
PDF
Meetup Tech Talk on Web Performance
PPTX
Http2 kotlin
PDF
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
PPTX
Introduction to gRPC. Advantages and Disadvantages
PPTX
HTTP/2 - Differences and Performance Improvements with HTTP
PPTX
HTTP 3.pptx
PPTX
PDF
Cs8591 Computer Networks - UNIT V
PDF
Web Protocol Future (QUIC/SPDY/HTTP2/MPTCP/SCTP)
Next generation web protocols
A New Internet? Introduction to HTTP/2, QUIC and DOH
HTML5, HTTP2, and You 1.1
HTTP Presentation
The new (is it really ) api stack
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
HTTP 2.0 – What do I need to know?
Let's use modern protocols everywhere!
Enabling Googley microservices with HTTP/2 and gRPC.
Meetup Tech Talk on Web Performance
Http2 kotlin
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
Introduction to gRPC. Advantages and Disadvantages
HTTP/2 - Differences and Performance Improvements with HTTP
HTTP 3.pptx
Cs8591 Computer Networks - UNIT V
Web Protocol Future (QUIC/SPDY/HTTP2/MPTCP/SCTP)
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Spectroscopy.pptx food analysis technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Spectroscopy.pptx food analysis technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Understanding_Digital_Forensics_Presentation.pptx
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx
Programs and apps: productivity, graphics, security and other tools

Introduction to HTTP2

  • 2. History of HTTP HTTP/0.9 1991 HTTP/1.0 HTTP/1.1 1996 1999 HTTP/2 2015
  • 3. Limitations of HTTP/1.1 Simple and text based. Concurrent Connection Limit Head-of-line blocking Unable to use TCP at it’s full capability Latency
  • 4. Limitations of HTTP/1.1 HTTP/1.1 RFC states that there should be only 2 concurrent connections per server/proxy. Maximum Concurrent connections supported by browsers: Chrome: 6 IE: 8 Firefox: 6 Opera: 6 Safari: 4
  • 5. Optimization with HTTP/1.1 ■ HTTP/1.1 defines Pipelining but most Browsers do not implement it. ■ Pipelining -> Multiple requests can be sent concurrently but still the responses are sent in the same order as the requests are made. PIPELINING
  • 6. Optimization with HTTP/1.1 ■ Use multiple sub-domains to get more connections ■ For example : sub-1.example.com, sub-2.example.com, sub-3.example.com etc. ■ Complicates architecture DOMAIN SHARDING
  • 7. Optimization with HTTP/1.1 ■ Combine resources into a single larger resource ■ Example, bundling of CSS and javascript,use of image sprites. ■ Inlining:Requests are reduced by using inline styles in HTML instead of writing in separate files. CONCATENATION AND INLINING
  • 8. More problems… ■ Complexity in Web design and maintenance increases. ■ Increased resource consumption. ■ Reduces cacheability of resources. ■ Duplicate resources
  • 9. SPDY ■ Experimental protocol, developed at Google and announced in mid-2009 with goals. - Target a 50% reduction in page load time(PLT) - Avoid the need for any changes to content by website authors. - Minimize deployment complexity. - Avoid change in network infrastructure - Implement in partnership with open-source community.
  • 10. SPDY Make more efficient use of the underlying TCP connection by introducing a new binary framing layer to enable request and response multiplexing, prioritization, and header compression.
  • 11. HTTP and SPDY evolution HTTP/0.9 1991 HTTP/1.0 HTTP/1.1 1996 1999 HTTP/2 Approved 2015 SPDY Implemented 2012 End of SPDY 2016 ■ July 2012 – development of SPDY announced publicly by group of developers at Google. ■ All Major browsers started implementing SPDY which started in the path of standardization. ■ February 2015, Google announced removal of support for SPDY ■ February 2016, Google announced that Chrome will no longer support SPDY after May 15, 2016 HTTP/2 first draft 2012 SPIDY Development 2009
  • 12. Beginning of HTTP/2.0 ■ March 2012 : Call for Proposal for HTTP/2 ■ November 2012: First Draft of HTTP/2 (Based on SPDY) ■ August 2014: HTTP/2 draft-17 and HPACL draft-12 are published ■ February2015: IESG approved HTTP/2 and HPACK drafts ■ May 2015: RFC 7540 (HTTP/2) and RFC 7541 (HPACK) are published.
  • 13. New in HTTP/2 ■ Reduce latency by introducing Header Field Compression ■ Allow multiple concurrent exchanges on the same connection. ■ Server Push
  • 14. Protocol Overview Supports all core features of HTTP/1.1 ■ HTTP/2 uses the same “http” and “https” URI schemes as HTTP/1.1 ■ HTTP/2 uses same default port numbers as HTTP/1.1 (80 for http and 443 for https) ■ HTTP Semantics, such as verbs, methods, and headers are unaffected.
  • 15. Binary Framing Layer HTTP 1.1 POST /upload HTTP/1.1 Host: www.example.com Content-Type: application/json Content-Length:15 {“msg”:”hello”} DATA frame HEADERS frame
  • 16. Streams, messages and frames •Stream: A bidirectional flow of bytes within an established connection, which may carry one or more messages. •Message: A complete sequence of frames that map to a logical request or response message. •Frame: The smallest unit of communication in HTTP/2, each containing a frame header, which at a minimum identifies the stream to which the frame belongs.
  • 18. Request and Response Multiplexing HTTP/2.2 enables full multiplexing by allowing the client and server to break down HTTP messages into independent frames, interleave them and them reassemble them on the other end. https://developers.google.com/web/fundamentals/performance/http2/
  • 19. Stream prioritization • Each stream may be assigned an integer weight between 1-256 • Each stream may be given an explicit dependency on another stream. https://developers.google.com/web/fundamentals/performance/http2/
  • 20. One connection per origin • No Longer needs multiple connections • Single connection is established between client and server and multiple streams are exchanged between them. • Reduces the memory and processing footprint along the full connection path. • Reduces Network latency.
  • 21. Flow control • A mechanism to prevent the sender from overwhelming the receiver with data • Each receiver may choose to set any window size that it desires for each stream and the entire connection. • Window size is defined in SETTINGS frame when connection is established • Default size is 65,535 bytes. Max is (2^31 -1) bytes • Can be maintained using WINDOW_UPDATE frame.
  • 22. Server Push • In addition to the response to the original request, the server can push additional resources to the client, without the client having to request each one explicitly. • Push resources can be: Ø Cached by the client Ø Reused across different pages Ø Multiplexed alongside other resources Ø Prioritized by the server Ø Declined by the client
  • 23. Server Push Image Source: https://developers.google.com/web/fundamentals/performance/http2/
  • 24. Header Compression • HPACK header compression reduces size of HTTP/2 header • Compressed using Huffman encoding, resulting in an average 30% reduction. • Frequently used headers can be encoded as variable length integer, opposed to re-sending the whole header every time. • Faster content delivery due to smaller headers.