

Having a fully multiplexed-on single TCP connection will reduce memory, network, and CPU load for both the client and the server. We wanted to reduce the cost, especially in load time and request time, with the connection multiplexing feature. HTTP/1.1 was limited to processing only one outstanding request per TCP connection, forcing clients to use multiple TCP connections to process multiple requests simultaneously. Streams enable the interleaving of frames from multiple streams together, which allows for proper multiplexed communication over a single connection. A stream is a bi-directional sequence of frames that share a common identifier (a stream id). For every single request/response communication, these frames are shipped as a stream. In HTTP/1.1, a request/response is formatted in header and body, wrapped in a single binary frame, while In HTTP/2, it's packed as binary frames. The primary goals for HTTP/2 are to reduce latency by enabling complete request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push. In May 2015, the HTTP/2 implementation specification was officially standardized in response to Google's HTTP-compatible SPDY protocol (as stated in ). To achieve the performance goals set by the HTTP Working Group, HTTP/2 introduces a new binary framing layer that is not backward compatible with previous HTTP/1.x servers and clients-hence the major protocol version increment to HTTP/2. HTTP/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process and hides all the complexity from our applications within the new framing layer. All the core concepts, such as HTTP methods, status codes, URIs, and header fields, remain in place. HTTP/2 does not modify the application semantics of HTTP in any way.

Public static final MediaType JSON = MediaType.HTTP/2 is the second major version of the application protocol in the form of HTTP.
