Enabling Http 2 using Spring Webflux And Webclients
4 min readJul 24, 2023
Introduction:
HTTP/2
is the second major version of the Hypertext Transfer Protocol (HTTP), the underlying protocol used to transfer data between a client (such as a web browser) and a server on the internet.
It was officially standardized in May 2015 and is designed to improve the performance and efficiency of web communication.
Advantages of HTTP/2 over HTTP/1:
- Multiplexing: which allows multiple requests and responses to be sent and received over a single TCP connection. In contrast,
HTTP/1.1
requires separate connections for each request, leading to increased overhead and latency. - Binary Protocol:
HTTP/2
uses a binary protocol, whereasHTTP/1
uses plain text. The binary framing of HTTP/2 is more efficient in parsing and serialization, reducing the complexity and making it easier for computers to process. - Header Compression:
HTTP/2
usesHPACK
, a header compression algorithm, to reduce the overhead caused by large header fields in each request and response. This helps to minimize the amount of data that needs to be transmitted, resulting in faster load times for web pages. - Server Push: a feature that allows the server to proactively send resources to the client before they…