What Does HTTP/2 Do?
HTTP/2 aims to improve web performance by reducing latency, enabling full request and response multiplexing, and efficiently compressing HTTP header fields. Additionally, it supports request prioritization and server push, enhancing the user experience.
Differences Between HTTP and HTTP/2
One of the key differences between HTTP/1.1 and HTTP/2 is multiplexing. HTTP/1.1 loads resources sequentially, while HTTP/2 uses a single TCP connection to send multiple streams of data simultaneously.
Why Isn't HTTP/2 More Widely Used?
HTTP/2 faces adoption challenges due to strict origin rules. One HTTP/2 connection cannot control another across different IP addresses and domain names.
HTTP/2 vs. HTTP/3
HTTP/2 and HTTP/3 differ mainly in their layering. HTTP/3 merges these layers and uses QUIC and UDP to form its built-in security and transport layers.
Disadvantages of HTTP/2
HTTP/2 has some drawbacks, such as limited interoperability and incomplete browser support. Additionally, its single connection can sometimes lead to head-of-line blocking.
HTTP/2 and SSL/TLS
Most modern browsers require an SSL/TLS connection for HTTP/2. Essentially, SSL/TLS has become de facto mandatory for HTTP/2-enabled websites.
When to Use HTTP/2
HTTP/2 is best for improving speed and decreasing latency. It introduces the concept of a stream, a bidirectional flow for transmitting multiple messages.
HTTP/2 and HTTPS
To use HTTP/2, the website should be served over a secure SSL/TLS connection and accessed via HTTPS.
Is TLS Mandatory for HTTP/2?
Technically, HTTP/2 allows for use over plain TCP as well as TLS. However, given browser requirements, TLS is practically mandatory for most HTTP/2 implementations.
HTTP/2 on Amazon Web Services
To utilize HTTP/2 on Amazon Web Services, you'll need to create an Application Load Balancer and enable HTTP/2 support.