首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁HTTP/3”︁的源代码
←
HTTP/3
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
HTTP/3 is the third major version of the Hypertext Transfer Protocol used to exchange information on the World Wide Web, complementing the widely-deployed [[HTTP/1.1]] and [[HTTP/2]]. Unlike previous versions which relied on the well-established TCP (published in 1974), HTTP/3 uses [[QUIC]], a multiplexed transport protocol built on UDP. On 6 June 2022, IETF published HTTP/3 as a Proposed Standard in RFC 9114. * [https://datatracker.ietf.org/doc/html/rfc9114 RFC9114] * [https://http3-explained.haxx.se/en/ HTTP3 explained] * [https://quicwg.org/ QUIC WorkingGroup] [[Image:HTTP semantics.png|300px]]<ref>https://nestify.io/blog/http-3-everything-you-need-to-know/</ref> = Overview = == HTTP/2 vs HTTP/3 == [[Image: QUIC vs TCP.webp|600px]] One of the main touted advantages of HTTP/3 is increased performance, specifically around fetching multiple objects simultaneously. With HTTP/2, any interruption (packet loss) in the TCP connection blocks all streams (Head of line blocking). Because HTTP/3 is UDP-based, if a packet gets dropped that only interrupts that one stream, not all of them. In addition, HTTP/3 offers 0-RTT support, which means that subsequent connections can start up much faster by eliminating the TLS acknowledgement from the server when setting up the connection. This means the client can start requesting data much faster than with a full TLS negotiation, meaning the website starts loading earlier.<ref>https://blog.cloudflare.com/http-3-vs-http-2</ref> [[Image:HTTP2 packet loss.gif|class=fixed-200|HTTP2]] [[Image:HTTP3 packet loss.gif|class=fixed-200|HTTP3]] == Performance == [[Image:HTTP3 performance.webp|600px]]<ref>https://requestmetrics.com/web-performance/http3-is-fast/</ref> = cURL with HTTP3= == Install build tools == <syntaxhighlight lang="bash"> wget http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz wget https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz wget https://ftpmirror.gnu.org/libtool/libtool-2.4.7.tar.gz cd m4-* ./configure make && sudo make install wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz ./configure --with-internal-glib </syntaxhighlight> == Build curl== Ref: https://github.com/curl/curl/blob/master/docs/HTTP3.md Build nghttp3: <syntaxhighlight lang="bash"> git clone -b v1.1.0 https://github.com/ngtcp2/ngtcp2 cd ngtcp2 autoreconf -fi ./configure --enable-lib-only make && sudo make install </syntaxhighlight> Build OpenSSL: <syntaxhighlight lang="bash"> wget https://www.openssl.org/source/openssl-3.2.0.tar.gz cd openssl ./config enable-tls1_3 make && sudo make install </syntaxhighlight> Build libpsl: <syntaxhighlight lang="bash"> wget https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz ./configure make && sudo make install </syntaxhighlight> Build curl: <syntaxhighlight lang="bash"> git clone https://github.com/curl/curl cd curl autoreconf -fi ./configure --with-openssl=/usr/local --with-nghttp3=/usr/local --with-ngtcp2=/usr/local </syntaxhighlight> = FAQ = === Is HTTP/3 using UDP more reliable than HTTP/2 (etc.) using TCP?=== It isn’t more reliable. It has quite different performance properties in some ways, mostly lower latency for HTTP requests, and much lower latency for HTTPS session setup. But the reliability is the same or lower. That’s not the point.<ref>https://www.quora.com/Why-is-HTTP-3-using-UDP-more-reliable-than-HTTP-2-etc-using-TCP</ref> === Why is encryption significant in HTTP/3?=== HTTP/3 encrypts connections by default at the transport layer, offering improved security. This differs from previous versions, where encryption occurred separately at the application layer. Encrypting by default helps protect user data, reduces latency, and ensures a safer browsing experience. [[Category:Network]] [[Category:RFC]] [[Category:Protocol]] [[Category:HTTP]]
返回
HTTP/3
。