使用者:Llxray/HTTP/3

維基百科,自由的百科全書
Llxray/HTTP/3
國際標準Bishop, Mike. Hypertext Transfer Protocol Version 3 (HTTP/3). quicwg.org. [2021-10-28] (英語).  (draft)
開發單位IETF
規範發布Internet Draft 截至2022年2月 (2022-02)

HTTP/3是用於在萬維網上交換信息的超文本傳輸協議即將到來的第三個主要版本,與HTTP/1.1HTTP/2並列。 HTTP/3 以QUIC傳輸層控制協議,它被發布為RFC 9000[1] [2]

HTTP/3 的協議棧與 HTTP/2 的比較

HTTP/3 使用與前版本相同的語義,包括相同的請求方法狀態代碼頭字段,但對它們使用了不同的編碼和維護會話狀態的方式。

截至2022年2月,HTTP/3協議仍然是一個互聯網草案,但其已經被73%的運行中的網絡瀏覽器所支持。[3]根據W3Techs的數據,排名前1000萬個網站中有24%的網站支持HTTP/3。[4]自2020年4月起,Google Chrome(包括基於它的Microsoft Edge,以及安卓版的Chrome)[5]已經支持它。自2021年5月起,Mozilla Firefox也支持它。[3][6]macOS Big SuriOS 14上的)Safari 14也實施了該協議,但默認是被禁用的。[7]

歷史[編輯]

HTTP/3 是 QUIC 工作組通過的互聯網草案。它最初的提案被命名為「使用QUIC傳輸協議的HTTP/2語義」。[8] 後來又被命名為「基於 QUIC 的超文本傳輸協議 (HTTP)」。 [9]

2018年10月28日,在一次郵件列表討論中,IETF HTTP和QUIC工作組主席Mark Nottingham提議將HTTP-over-QUIC重命名為HTTP/3,以 "清楚地識別它是HTTP語義與傳輸層協議的另一種結合......讓人們理解它與QUIC本身的分離"。[10]諾丁漢的提議在幾天後被IETF成員接受。HTTP工作組被授權在HTTP/3的設計過程中協助QUIC工作組,並在發布後承擔維護責任。[11]

對 HTTP/3 的支持於 2019 年 9 月添加到Chrome (Canary版)中,然後被應用到穩定版中。但它被默認禁用,並於 2020 年 4 月起被默認啟用。 [12] Firefox 在 2019 年 11 月[3][13][14]添加了對 HTTP/3 的支持,並於 2021 年 4 月在 Firefox 88 中默認啟用它。[3][6]對 HTTP/3 的實驗性支持已於 2020 年 4 月 8 日[15]添加到 Safari 技術預覽版中,並包含在iOS 14macOS 11 [16]附帶的 Safari 14 中,但默認情況下仍處于禁用狀態。 [7]

與 HTTP/1.1 和 HTTP/2 的比較[編輯]

HTTP的語義在不同的版本中是一致的:相同的請求方式狀態代碼消息頭通常適用於所有的版本。差異在於這些語義與底層傳輸的映射。HTTP/1.1HTTP/2都使用TCP作為其傳輸層控制協議。HTTP/3使用QUIC,這是一個傳輸層控制協議,在用戶數據報協議(UDP)上使用用戶空間擁堵控制。轉換到QUIC的目的是解決HTTP/2的一個主要問題,即 "隊頭阻塞":因為HTTP/2的多路復用的並行性質TCP的丟包重傳是不可見的,一個丟失或重新排序的數據包就會導致所有進行的傳輸停滯,無論該傳輸是否受到丟包的影響。由於QUIC原生提供多路復用,丟失的數據包只影響數據丟失的流。

實現[編輯]

客戶端[編輯]

瀏覽器[編輯]

瀏覽器 HTTP/3的支持
瀏覽器 開始實現的版本(默認禁用) 默認啟用的版本
Chrome 穩定版(79) 2019 年 12 月 87 [17] 2020 年 4 月[18] 早期版本實現了 QUIC 的其他草案(gQUIC)
Firefox 穩定版 (72.0.1) 2020 年 1 月 88 [6] 2021 年 4 月[19]
Safari 技術預覽版104 2020 年 4 月
Edge 87 2020 年 4 月

源碼庫[編輯]

為 QUIC 和 HTTP/3 實現客戶端或服務器邏輯的開源包括[20]

實現HTTP/3源碼庫
名稱 客戶端 服務端 語言 開發公司 庫地址
lsquic C Litespeed https://github.com/litespeedtech/lsquic
nghttp3 C https://github.com/ngtcp2/nghttp3
h2o C https://github.com/h2o/h2o
libcurl[21][22] C https://github.com/curl/curl
MsQuic[23] C Microsoft https://github.com/microsoft/msquic
proxygen C++ Facebook https://github.com/facebook/proxygen#quic-and-http3
Cronet C++ Google https://github.com/chromium/chromium/tree/main/net/quic
.NET[24] C# (using MsQuic)[25] Microsoft https://github.com/dotnet
quic-go Go https://github.com/lucas-clemente/quic-go
http3 Haskell https://github.com/kazu-yamamoto/http3
Kwik Java https://github.com/ptrd/kwik
Flupke Java https://bitbucket.org/pjtr/flupke
aioquic Python https://github.com/aiortc/aioquic
quiche Rust Cloudflare https://github.com/cloudflare/quiche
neqo Rust Mozilla https://github.com/mozilla/neqo
quinn Rust https://github.com/quinn-rs/quinn

服務器[編輯]

  • LiteSpeed Web 服務器(和 OpenLiteSpeed)支持 HTTP/3 草案 32。 [26]
  • 從 2.0 beta 17 開始, Caddy Web 服務器對 HTTP/3 具有實驗性支持。 [27]
  • Nginx對 HTTP/3 的支持正在開發中。 2020 年 6 月發布了支持 HTTP/3 的 nginx 技術預覽。 [28]
  • Cloudflare 為 nginx 分發了一個補丁,該補丁將 quiche HTTP/3 庫集成到其中。 [29]

也可以看看[編輯]

參考[編輯]

  1. ^ Cloudflare HTTP/3. 
  2. ^ QUIC: A UDP-Based Multiplexed and Secure Transport. May 2021. 
  3. ^ 3.0 3.1 3.2 3.3 Can I use... Support tables for HTML5, CSS3, etc. caniuse.com. [2021-12-03]. 
  4. ^ Usage of HTTP/3 for websites. World Wide Web Technology Surveys. W3Techs. [3 December 2021]. 
  5. ^ Enabling QUIC in tip-of-tree. groups.google.com. [2021-04-08]. 
  6. ^ 6.0 6.1 6.2 Damjanovic, Dragana. QUIC and HTTP/3 Support now in Firefox Nightly and Beta. Mozilla Hacks – the Web developer blog. 16 April 2021 [2021-04-17] (美國英語). 
  7. ^ 7.0 7.1 Safari 14 Release Notes. developer.apple.com. [4 December 2020]. 
  8. ^ HTTP/2 Semantics Using The QUIC Transport Protocol. 8 July 2016. 
  9. ^ Cimpanu, Catalin. HTTP-over-QUIC to be renamed HTTP/3 | ZDNet. ZDNet. 12 November 2018 [12 November 2018] (英語). 
  10. ^ Nottingham, Mark. Identifying our deliverables. IETF Mail Archive. 28 October 2018. 
  11. ^ Hypertext Transfer Protocol Charter. ietf.org. [2020-09-02]. 
  12. ^ Enabling QUIC in tip-of-tree. groups.google.com. [2021-04-08]. 
  13. ^ Daniel, Stenberg. Daniel Stenberg announces HTTP/3 support in Firefox Nightly. Twitter. [5 November 2019]. 
  14. ^ Cimpanu, Catalin. Cloudflare, Google Chrome, and Firefox add HTTP/3 support. ZDNet. 26 Sep 2019 [27 Sep 2019]. 
  15. ^ Release Notes for Safari Technology Preview 104. webkit.org. 8 April 2020 [7 August 2020]. 
  16. ^ Safari 14 Release Notes. developer.apple.com. [4 December 2020]. 
  17. ^ Can I use... Support tables for HTML5, CSS3, etc. caniuse.com. [2021-04-09]. 
  18. ^ Enabling QUIC in tip-of-tree. groups.google.com. [2021-04-09]. 
  19. ^ Firefox Release Owners - MozillaWiki. wiki.mozilla.org. [2021-04-09]. 
  20. ^ QUIC Implementations. GitHub. [2021-04-08] (英語). 
  21. ^ First HTTP/3 with curl. Daniel Stenberg. August 5, 2019 [October 2, 2019]. 
  22. ^ cURL HTTP3 wiki. Daniel Stenberg. September 26, 2019 [October 2, 2019]. 
  23. ^ MsQuic is Open Source. April 28, 2020 [April 28, 2020]. 
  24. ^ HTTP/3 support in .NET 6. September 17, 2021 [September 17, 2021]. 
  25. ^ HTTP/3 support in .NET 6. .NET Blog. 2021-09-17 [2022-01-12] (美國英語). 
  26. ^ LiteSpeed Web Server Release Log. LiteSpeed Web Server Release Log. 2020-04-17 [2020-06-26] (英語). 
  27. ^ Release 2.0 beta 17 · caddyserver/caddy. Github. 2020-03-13 [2020-08-11] (美國英語). 
  28. ^ Introducing a Technology Preview of NGINX Support for QUIC and HTTP/3. NGINX. 2020-06-10 [2020-06-11] (美國英語). 
  29. ^ Experiment with HTTP/3 using NGINX and quiche. The Cloudflare Blog. 2019-10-17 [2019-11-09] (英語). 

外部連結[編輯]