HTTP/2 Protocol: Enhancements and Goals

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

As part of the HTTP/2.0 work, which of the following issues are explicitly called out for consideration?

  • A negotiation mechanism that is capable of not only choosing between HTTP/1.x and HTTP/2.x, but also for bindings of HTTP URLs to other transports (for example).
  • Header compression (which may encompass header encoding or tokenisation)
  • Server push (which may encompass pull or other techniques)
  • All of the above (correct)

HTTP/2.0 will substantially decrease end-user perceived latency in most cases, over HTTP/1.1 using TCP.

True (A)

HTTP/2.0 will require multiple connections to a server to enable parallelism.

False (B)

HTTP/2.0 retains the semantics of HTTP/1.1, leveraging existing documentation.

<p>True (A)</p> Signup and view all the answers

What are the goals of HTTP/2?

<p>Backwards compatibility with HTTP 1.1, usage compatibility with HTTP 1.1 or other protocols, and improved speed via compression of headers, push, no blocking problems, and parallel transmission.</p> Signup and view all the answers

Which of the following is true about HTTP/2 compared to HTTP/1.x?

<p>All of the above (D)</p> Signup and view all the answers

Why are binary protocols more efficient?

<p>Binary protocols are more efficient to parse, more compact, and less error-prone.</p> Signup and view all the answers

HTTP/1.x presents _____ Blocking (head-of-line): one long to process request can block all remaining requests (even with pipelining)

<p>HOL</p> Signup and view all the answers

What does HTTP/2 multiplexing permit?

<p>HTTP/2 multiplexing permits to use just 1 TCP connection per page.</p> Signup and view all the answers

How many connections do clients open per origin server in HTTP/1.x?

<p>In HTTP/1.x clients open several (usually 4 to 8) connections per origin server.</p> Signup and view all the answers

Describe HTTP/2 server push.

<p>Server Push allows the server to avoid delay by 'pushing' the responses it thinks the client will need into its cache.</p> Signup and view all the answers

How many TCP round trips does it take to get the headers to the client in modern websites?

<p>It takes at least 7-8 TCP round trips to get the headers to the client.</p> Signup and view all the answers

If the server is non HTTP/2 compliant, what response will it send?

<p>Normal (HTTP) response. (A)</p> Signup and view all the answers

If the server is HTTP/2 compliant, what will it do?

<p>Upgrade to HTTP/2.</p> Signup and view all the answers

What does the client send after the TCP (TLS) connection in HTTP/2?

<p>The client sends the preface.</p> Signup and view all the answers

Flashcards

HTTP Version Negotiation

A negotiation mechanism to choose between HTTP/1.x and HTTP/2.x, as well as bindings of HTTP URLs to other transports.

HTTP/2 Latency Improvement

HTTP/2 substantially and measurably improves end-user perceived latency in most cases, over HTTP/1.1 using TCP.

Head of Line Blocking

HTTP/2 aims to address the 'head of line blocking' problem in HTTP.

HTTP/2 Connection Management

HTTP/2 does not require multiple connections to a server for parallelism, improving TCP use and congestion control.

Signup and view all the flashcards

HTTP/2 Compatibility

To be compatible with HTTP 1.1(methods, status codes, URI/URL, header fields, etc.)

Signup and view all the flashcards

Key features of HTTP/2

HTTP/2 is binary, not textual, used header compression to reduce overhead, and allows servers to push responses proactively into client caches

Signup and view all the flashcards

HTTP/2 and TCP Connections

HTTP/2 multiplexing permits to use just one TCP connection per page.

Signup and view all the flashcards

HTTP/2 Server Push

Server Push allows the server to avoid delay by 'pushing' the responses it thinks the client will need into its cache

Signup and view all the flashcards

HTTP/2 Initial Connection

After the TCP (TLS) connection, the client sends the preface, then a HTTP/2 frame (SETTINGS)

Signup and view all the flashcards

HTTP/2 Header Compression

Header compression reduces overhead, allowing requests to go to the net within one roundtrip (even one packet).

Signup and view all the flashcards

Study Notes

  • Project Web: HTTP/2 by Carles Mateu, Computer Science and Artificial Intelligence, University of Lleida

HTTP/2

  • Issues explicitly addressed in HTTP/2.0
  • Negotiation mechanism between HTTP/1.x and HTTP/2.x.
  • Negotiation of bindings of HTTP URLs to other transports.
  • Header compression that includes header encoding or tokenisation.
  • Server push, which may include pull or other techniques.
  • HTTP/2.0 is expected to:
  • Improve end-user perceived latency over HTTP/1.1 using TCP.
  • Address the "head of line blocking" problem in HTTP.
  • Improve TCP use regarding congestion control without needing multiple connections to a server to enable parallelism.
  • Retain the semantics of HTTP/1.1, leveraging existing documentation including HTTP methods, status codes, URIs, and header fields.
  • Clearly define how HTTP/2.0 interacts with HTTP/1.x, especially in intermediaries (both 2->1 and 1->2).
  • Identify any new extensibility points and policy for appropriate use..

Goals of HTTP/2

  • Backwards compatible with HTTP 1.1 with methods, status codes, URI/URL, header fields, etc.
  • Usage compatibility with HTTP 1.1 or other protocols with negotiation.
  • Improved speed through:
  • Compression of headers
  • Server push to client
  • No blocking problems (HOL)
  • Parallel transmission

HTTP/2 vs HTTP/1.x

  • HTTP/2 is binary, while HTTP/1.x is textual.
  • HTTP/2 is fully non-ordered multiplexed, compared to HTTP/1.x which is ordered and blocking multiplexing.
  • In HTTP/2, one connection can be used for parallelism.
  • HTTP/2 uses header compression to reduce overhead.
  • HTTP/2 enables servers to proactively "push" responses into client caches.

HTTP/2 Binary Protocol

  • Binary protocols are more efficient to parse, compact, and less error-prone.
  • HTTP/1.x "helps" with whitespace handling, capitalization, line endings, blank links, etc.
  • HTTP/1.1 defines up to four ways to parse a message; in HTTP/2, there is just one code path regarding spaces, blanks, and upper/lowercase.
  • HTTP/2 is not easily debuggable by hand and requires tools.

HTTP/2 Multiplexing

  • HTTP/1.x presents head-of-line (HOL) blocking where one long process request can block all remaining requests, even with pipelining.
  • Pipelining can be difficult to deploy and use because some proxies and servers may fail.
  • HTTP/1.x pipelining forces the client to heuristically decide what to request by which connection.
  • Multiplexing addresses the single connection issue, allowing multiple simultaneous requests and responses, even inter-mixing them.
  • HTTP/2 multiplexing permits using just 1 TCP connection per page.

HTTP/2 Single Connection

  • In HTTP/1.x, clients may open several (usually 4 to 8) connections per origin server, which expands if a website uses multiple origins.
  • Multiple (up to 30) connections can disrupt TCP workings.
  • Every TCP connection starts flooding data in response transmission; buffers in the receiver may overflow which causes congestion and retransmits.
  • Using many connections can be unfair, monopolizing network usage and affecting better-behaved applications like VoIP.

HTTP/2 Server Push

  • With HTTP/1.x, after a request for a page the server sends the HTML response
  • Server waits for the client to parse the HTML and request all required assets (JavaScript, images, and CSS) before sending them.
  • Server Push enables the server to avoid this delay by "pushing" the responses it anticipates the client will need into its cache.

HTTP/2 Header Compression

  • Modern websites have about 80 assets minimum per page.
  • Each request includes approximately 1400 bytes of headers for Cookies, Referer, etc.
  • Reaching the client headers takes at least 7-8 TCP round trips.
  • This outcome is related to the TCP Slow Start that sends packets based on how many packets that have been acknowledged, limiting the first few packets that can be sent out for the first few round trips.
  • Header compression enables those requests to go to the net within one roundtrip.
  • This overhead becomes worse on mobile clients with round-trip latency of several hundred milliseconds even in good network conditions.

HTTP/2 Working over HTTP/1.x

  • If the server is non-HTTP/2 compliant, a normal HTTP response occurs.
  • HTTP/1.1 200 OK.
  • Content-Length: 8735.
  • Content-Type: text/html.
  • If the server is HTTP/2 compliant, it will upgrade to HTTP/2
  • HTTP/1.1 101 Switching Protocols.
  • Connection: Upgrade.
  • Upgrade: h2c.
  • HTTP/2 connection.

HTTP/2 Native Working

  • After the TCP (TLS) connection, the client sends the preface.
  • 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0
  • (PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n)
  • Then an HTTP/2 frame is sent for SETTINGS.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser