This article will take you from understanding to building HTTP/3 web services

NGINX evolves to cloud native, All in OpenNJet

HTTP is an important backbone of the Internet, and in layman's terms, it allows users to load websites. After years of development, HTTP has developed from HTTP/1.0 to HTTP/1.1, HTTP/2, and now HTTP/3. With each iteration, new functions will be added to meet contemporary needs, such as security, session processing, and application Program layer requirements.

From HTTP/1.0 to HTTP/2, the HTTP protocol has been upgraded three times, but the smooth HTTP and the iron-clad TCP are because the TCP protocol is more reliable. However, not long after HTTP/2 was launched, companies have begun to vigorously develop HTTP/ 3. As Internet traffic continues to grow and application requirements continue to increase, the shortcomings of HTTP/2 are becoming more and more obvious.
 
First, the final version of HTTP/2 did not include many of the improvements people hoped to make over HTTP/1.1. To maintain backward compatibility with HTTP/1.1, the protocol must retain the same POST requests GET , status codes (200, 301, 404, and 500), etc.
 
Additionally, some implemented features introduce security issues. In addition to the legacy lack of enforced encryption, vulnerable compressed page headers and cookies are also included.
The goal of HTTP/3 is to provide fast, reliable, and secure Web connections on all forms of devices by solving the transmission-related problems of HTTP/2. To do this, it uses a new transport layer network protocol called QUIC, which runs on User Datagram Protocol (UDP) instead of TCP used by previous versions of HTTP.

Why is HTTP/3 important?

The advantage of HTTP/3 functionality comes from the underlying QUIC protocol. QUIC (Quick UDP Internet Connection) is a new transmission method that reduces latency compared to TCP. On the surface, QUIC is very similar to TCP + TLS + HTTP/2 implemented over UDP. Since TCP is implemented in the operating system kernel and intermediate device firmware, it is almost impossible to make significant changes to TCP. However, since QUIC is built on top of UDP, it has no such limitations.
QUIC’s major feature improvements over existing TCP + TLS + HTTP2 include
  • Using TLSv1.3, significantly shortening connection establishment time
  • Improve congestion control
  • Multiplexing to solve head-of-line blocking
  • forward error correction
  • Connection migration
TCP must have limitations:
  • Your data transfer may intermittently hang;
  • Stream-level multiplexing is not supported;
  • Leads to redundant communications;
The QUIC protocol addresses these TCP limitations by introducing some changes in the underlying transport mechanism.
 
TCP has proven to be a very powerful transport protocol supporting the growth of Internet traffic. However, by design, TCP was never suitable for handling data transmission over lossy wireless media. In the early days of the internet, wired connections were the only connections that existed, connecting every computer connected to the Internet, so this was never an issue.
 
There are now more smartphones and portable devices than desktops and laptops, and more than 50% of Internet traffic is transmitted wirelessly. With this growth, the overall web browsing experience has deteriorated as response times have increased. Several factors contribute to this situation, the most important of which is head-of-line blocking when wireless coverage is insufficient.
Google uses QUIC as the underlying transport protocol for some popular Google services, which greatly improves response speed and user experience. By deploying QUIC as the underlying transport protocol for streaming YouTube videos, Google reports a 30% drop in rebuffering rates, which has a direct impact on the video viewing experience.

Best use cases for HTTP/3

The purpose of HTTP/3 is to improve the overall network experience, especially in areas where high-speed wireless Internet access is still unavailable. While HTTP/2 is well suited for some of these applications, HTTP/3 adds value in the following scenarios.

Internet of Things (IoT)

 
HTTP may not be the protocol of choice for IoT, but there are applications that are well suited to HTTP-based communications. For example, HTTP/3 can solve the problem of lossy wireless connections for mobile devices collecting data from connected sensors. This also applies to standalone IoT devices installed on vehicles or movable assets. Since HTTP/3 has a strong transport layer, accessing such devices over HTTP is more reliable.

Real-time ad bidding

Bidding occurs in real time when an ad is served to a web browser. Page and user information are sent to ad exchanges, which then auction them off to the highest bidder. All companies that can advertise to consumers bid to be the ones who make that impression. This is algorithmic competition for space provided by ad serving networks.
Having a connection that only requires one confirmation (one handshake) can greatly improve the performance of bids and allows bids to load faster, ensuring that page loads are not delayed by this series of competition, faster ad loading requires faster pages load.

microservices

In a microservices mesh, a lot of time is wasted browsing all the microservices in order to get data. HTTP is always the slowest hop. So the faster each request is made between each system (measured in thousandths of a second instead of hundredths of a second), the better the data isolation is and the less data is replicated across the network .
 
The advantage of the QUIC protocol is that the number of handshakes is relatively small, so you can deliver these requests in single digits of milliseconds, and your microservices can be purer, allowing for true single responsibility. The benefit of using HTTP/3 here comes more from the speed of completing each micro-interaction and less from the high throughput when accessing big data.

How to build HTTP/3 web service based on OpenNJet

to test the speed of your website and the speed of your internet connection

The HTTP/3 testing tool under CentOS 7 can be downloaded from Gitee
For specific operation procedures, please refer to  the explanation article https://njet.org.cn/cases/http3_support/

Use third-party tools

Currently, the latest versions of Firefox and Chrome browsers already support the QUIC protocol. You can refer to the corresponding documents to enable QUIC protocol support. During testing, when connecting for the first time, the protocol used may be HTTP1 or HTTP2. At this time, you can refresh it a few times and you will see that the web page transmission is completed using the HTTP3 protocol. Alternatively, you can use  https://http3check.net/  to test your implementation.
 
HTTP/3 provides Web applications with more benefits than HTTP/2, especially in terms of performance, security, and compatibility. It is already heavily used by large tech companies such as Google, Meta, Microsoft, Akamai, Cloudflare, Fastly, NGINX and Ericsson.
 
HTTP/3 is really here!
 

OpenNJet   was first based on the basic fork of NGINX1.19 and evolved independently. OpenNJet has the characteristics of high performance, stability, and easy expansion. It also solves the long-standing problems of NGINX such as difficulty in dynamic configuration and management functions affecting business. As the underlying engine, OpenNJet uses the dynamic loading mechanism to implement different product forms, such as API gateway, message proxy, inbound and outbound proxy, load balancing, WAF, etc. In the cloud-native architecture, OpenNJet not only provides north-south communication gateway functions, but also provides new features such as east-west communication in the service grid, transparent traffic hijacking, circuit breaker, telemetry and fault injection.

Gitee     mailing group
invites you to open source and build together:
https://njet.org.cn/

Fined 200 yuan and confiscated more than 1 million Musk's hard-core migration server TCP congestion control saved the Internet Apache OpenOffice is a de facto "unmaintained" project Google celebrates its 25th anniversary Raspberry Pi 5 will be released at the end of October, starting at $60 Microsoft open-sources windows-drivers-rs and uses Rust to develop Windows drivers. macOS Containers: Use Docker to run macOS images on macOS. 7 habits of high-performance software engineers. It took two years to spend $15,000. How can Chrome extensions make money?
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/6606114/blog/10112475