4

CloudFront 支援 HTTP/3

 1 year ago
source link: https://blog.gslin.org/archives/2022/08/16/10844/cloudfront-%e6%94%af%e6%8f%b4-http-3/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CloudFront 支援 HTTP/3

雖然 HTTP/3 還沒有進到 Standard Track,但看到 CloudFront 宣佈支援 HTTP/3 了:「New – HTTP/3 Support for Amazon CloudFront」。

只要在 CloudFront 的 console 上勾選起來就可以了:

gpzUEkp.png

看了看 RFC 9114: HTTP/3 文件裡的描述,client 可以試著建立 UDP 版本的 QUIC 連線,但要有機制在失敗時回去用 TCPHTTP/2 或是 HTTP/1.1

A client MAY attempt access to a resource with an "https" URI by resolving the host identifier to an IP address, establishing a QUIC connection to that address on the indicated port (including validation of the server certificate as described above), and sending an HTTP/3 request message targeting the URI to the server over that secured connection. Unless some other mechanism is used to select HTTP/3, the token "h3" is used in the Application-Layer Protocol Negotiation (ALPN; see [RFC7301]) extension during the TLS handshake.

Connectivity problems (e.g., blocking UDP) can result in a failure to establish a QUIC connection; clients SHOULD attempt to use TCP-based versions of HTTP in this case.

另外一條路是在 TCP 連線時透過 HTTP header 告訴瀏覽器升級:

An HTTP origin can advertise the availability of an equivalent HTTP/3 endpoint via the Alt-Svc HTTP response header field or the HTTP/2 ALTSVC frame ([ALTSVC]) using the "h3" ALPN token.

像是這樣:

Alt-Svc: h3=":50781"

然後 client 就可以跑上 HTTP/3:

On receipt of an Alt-Svc record indicating HTTP/3 support, a client MAY attempt to establish a QUIC connection to the indicated host and port; if this connection is successful, the client can send HTTP requests using the mapping described in this document.

另外在 FAQ 裡面有提到啟用 HTTP/3 是不另外計費的,就照著本來的 request 費用算:

Q. Is there a separate charge for enabling HTTP/3?

No, there is no separate charge for enabling HTTP/3 on Amazon CloudFront distributions. HTTP/3 requests will be charged at the request pricing rates as per your pricing plan.

先開起來玩看看...

Related

關於各家 CDN 的選擇...

在使用 CDN 前,先考慮上 SPDY 或 HTTP/2 (i.e. 全站 HTTPS),改善的效果跟 CDN latency 帶來的效益有得拼。尤其是 server 放在美國機房的情況,SPDY 與 HTTP/2 帶來的效能提昇是相當明顯的。 會寫這篇是因為這兩個禮拜意外被問到好幾次,所以來整理幾家如果讓我來選,我會選擇的 CDN。至少再被問到的時候可以直接從這邊開始說明。 下面的圖是從我家裡 HiNet 光世代測試的結果 (最後是走兩條電話線),所以會有個 10ms 的 latency 基底,如果要計算 latency 的效能影響請考慮進去。 Akamai 先講 Akamai。 Akamai 的歷史很久了,再加上併購了不少公司,所以產品成熟度很夠,你要什麼產品都有提供,只要拿的出錢就可以。 KKBOX (敝公司) 用過 PMD、DSD、DSA 三個產品,其中 PMD 與 DSD 只有保障服務可靠度 (availability),DSA 還有保障效能提昇 (performance)。早期是用 PMD + DSD,現在改用 PMD…

August 20, 2015

In "CDN"

AWS CloudFront 增加的功能

引用 CTO Werner Vogels 寫的「Dynamic Content Support in Amazon CloudFront」這篇好了,雖然沒有講完整,但把重點都提到了,而且比官方網誌「Amazon CloudFront - Support for Dynamic Content」這篇清楚... 這次 AWS CloudFront 上的功能都可以在 AWS Management Console 上設定,不需要另外安裝 3rd party 軟體或是自己寫程式呼叫 API。 這次最主要的更新在支援 query string。在之前的版本,這兩個 url 會被 CloudFront 當作是同樣的 url 而被 cache 成同一份: http://www.example.com/user.php?username=gslin http://www.example.com/user.php?username=gslin2 而這次可以設定是否要將 query string 納入計算。 另外一個重要的設計是支援 Cache-Control 與 Expires,當 Cache-Control…

May 15, 2012

In "AWS"

AWS 推出直播服務 Amazon Interactive Video Service (Twitch-as-a-Service)

把直播系統包在一起的服務 Amazon Interactive Video Service:「Amazon Interactive Video Service – Add Live Video to Your Apps and Websites」。 這邊先抱怨一下,這個服務的網址是 https://aws.amazon.com/ivs/,但 Elastic Load Balancer (ELB) 卻是 https://aws.amazon.com/elasticloadbalancing/,這是差別待遇啊... 回到原來的主題,這個服務做了幾件事情。收到 RTMPS stream 後,他會轉成許多格式: If you send the maximum 8.5Mbps, 1080p60 stream, Amazon IVS will create 8.5Mbps 1080p60, 3Mbps 720p60, 2Mbps 720p30, 1.2Mbps 480p30, 800Kbps…

July 16, 2020

In "AWS"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on August 16, 2022Categories AWS, CDN, Cloud, Computer, Murmuring, Network, Service, WWWTags amazon, aws, cdn, cloud, cloudfront, connection, http, http/3, https, network, performance, quic, service, udp

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK