HTTP/2
By
Ashish Padalkar
10715002712
CSE - 1
Class Serial Number - 25
HTTP
• HTTP stands for Hypertext Transfer
Protocol.
• It is a application layer network protocol.
• Its definition presumes an underlying and
reliable transport layer protocol, and
Transmission Control Protocol is commonly
used.
• Follows request-response paradigm.
Request Response Cycle
HTTP protocol is a request/response protocol based on client server
based architecture where web browsers, robots and search engines act
like HTTP clients , and the webservers act as a Server.
Client issues a request and the server issues a response that includes
not only
the requested content , but also relevant status information about the
request.
History of HTTP
• HTTP 1.0 was published as RFC 1945 in 1996
• HTTP 1.1 standard as defined in RFC 2068 was officially released in January 1997.
• SPDY 1.0 on which HTTP/2 is based was released by Google in 2009.
• HTTP 2.0 specification was published as RFC 7540 in May 2015.
Why do we need HTTP/2 ?
Sizes of websites have grown immensely since HTTP 1.1 was
introduced in 1997 and therefore we need a much efficient protocol
for handling such large amount of data.
2015
200K (zipped ) – 600K (unzipped)
HTTP/2 New Features
• Binary Protocol
• Multiplexing
• Header Compression
• Avoid Head of Line blocking
• Prioritization of Frames
• Server Push
Binary Protocol
HTTP/2 is binary , instead of textual
• More efficient to parse
• More compact on the wire
• Much less error prone as compared
to textual protocols
Multiplexing
Allows messages to be
interleaved together on a
connection at the same time
thus allowing multiple
requests and response
messages to be in flight at
the same time
Header Compression
• If you assume that a page has about 80 assets (which is conservative
in today’s Web), and each request has 1400 bytes of headers, it
takes at least 7-8 round trips to get the headers out “on the wire.”
• In comparison, even mild compression on headers allows those
requests to get onto the wire within one roundtrip – perhaps even
one packet.
• This overhead is considerable, especially when you consider the
impact upon mobile clients, which typically see round-trip latency of
several hundred milliseconds, even under good conditions.
• Using zlib, 85-90% compression can be achieved
Prioritization of Frames
• HTTP/2 splits the communication in frames.
• All frames are sent over a single TCP connection
• Frames are interleaved.
• Frames are Prioritized.
• Frames are flow controlled.
Server Push
Allows server to push responses proactively into client caches for future use.
Helps avoid round trip between fetching HTML and linked stylesheets and scripts as
server can start sending these things right away without waiting for client to request
them.
Actual Performance Improvements
HTTP 1.1
Load Time 0.98 sec
HTTP/2
Load Time 0.72 sec
Browsers that support HTTP/2

HTTP/2

  • 1.
  • 2.
    HTTP • HTTP standsfor Hypertext Transfer Protocol. • It is a application layer network protocol. • Its definition presumes an underlying and reliable transport layer protocol, and Transmission Control Protocol is commonly used. • Follows request-response paradigm.
  • 3.
    Request Response Cycle HTTPprotocol is a request/response protocol based on client server based architecture where web browsers, robots and search engines act like HTTP clients , and the webservers act as a Server. Client issues a request and the server issues a response that includes not only the requested content , but also relevant status information about the request.
  • 4.
    History of HTTP •HTTP 1.0 was published as RFC 1945 in 1996 • HTTP 1.1 standard as defined in RFC 2068 was officially released in January 1997. • SPDY 1.0 on which HTTP/2 is based was released by Google in 2009. • HTTP 2.0 specification was published as RFC 7540 in May 2015.
  • 5.
    Why do weneed HTTP/2 ? Sizes of websites have grown immensely since HTTP 1.1 was introduced in 1997 and therefore we need a much efficient protocol for handling such large amount of data. 2015 200K (zipped ) – 600K (unzipped)
  • 6.
    HTTP/2 New Features •Binary Protocol • Multiplexing • Header Compression • Avoid Head of Line blocking • Prioritization of Frames • Server Push
  • 7.
    Binary Protocol HTTP/2 isbinary , instead of textual • More efficient to parse • More compact on the wire • Much less error prone as compared to textual protocols
  • 8.
    Multiplexing Allows messages tobe interleaved together on a connection at the same time thus allowing multiple requests and response messages to be in flight at the same time
  • 9.
    Header Compression • Ifyou assume that a page has about 80 assets (which is conservative in today’s Web), and each request has 1400 bytes of headers, it takes at least 7-8 round trips to get the headers out “on the wire.” • In comparison, even mild compression on headers allows those requests to get onto the wire within one roundtrip – perhaps even one packet. • This overhead is considerable, especially when you consider the impact upon mobile clients, which typically see round-trip latency of several hundred milliseconds, even under good conditions. • Using zlib, 85-90% compression can be achieved
  • 10.
    Prioritization of Frames •HTTP/2 splits the communication in frames. • All frames are sent over a single TCP connection • Frames are interleaved. • Frames are Prioritized. • Frames are flow controlled.
  • 11.
    Server Push Allows serverto push responses proactively into client caches for future use. Helps avoid round trip between fetching HTML and linked stylesheets and scripts as server can start sending these things right away without waiting for client to request them.
  • 12.
    Actual Performance Improvements HTTP1.1 Load Time 0.98 sec HTTP/2 Load Time 0.72 sec
  • 13.