AWS 推出 Amazon Elastic Container Registry Public (公開版的 ECR)

算是延伸產品線,把 Amazon ECR 變成可以公開使用:「Amazon Elastic Container Registry Public: A New Public Container Registry」。

這篇稍微有趣的地方是,文章裡面的上面這張圖有把 path 模糊化,但下面那張沒有遮,後面的文字也直接有提到 path (這是要給使用者玩的...):

ECR Public 會自動同步到兩個 region,但設定的頁面上好像沒寫會怎麼挑... 另外前面會放 CloudFront 加速。

ECR Public automatically replicates container images across two AWS Regions to reduce download times and improve availability. Therefore, using public images directly from ECR Public may simplify your build process if you were previously creating and managing local copies. ECR Public caches image layers in Amazon CloudFront, to improve pull performance for a global audience, especially for popular images.

費用的部份,意外的有提供一些免費的空間與頻寬可以用,算是在推廣嗎?

Amazon CloudFront 增加墨西哥與紐西蘭的點

Amazon CloudFront 新增加了四個點,兩個在墨西哥,兩個在紐西蘭:「Amazon CloudFront launches in two new countries - Mexico and New Zealand」。

比較特別的是墨西哥的點仍然是被併入北美區的價錢,也就是 CloudFront 裡面最低的那組價錢:

In Mexico, our two new edge locations in Querétaro will provide viewers as much as a 30% reduction in p90 latency measures. These new edge locations are priced within CloudFront’s North America geographic region.

所以這代表在墨西哥當地的網路成本跟美國是一樣低?

CloudFront 宣佈支援 Brotli

CloudFront 宣佈支援 Brotli:「Amazon CloudFront announces support for Brotli compression」。

官方的說明發現 Gzip 可以好 24%:

CloudFront's Brotli edge compression delivers up to 24% smaller file sizes as compared to Gzip.

Akamai 在「Understanding Brotli's Potential」這邊提到的測試數字稍微做了分類,可以看到在 html 下 Brotli 帶來的改善是最多的。

以前在 CloudFront 上還是可以支援 Brotli,主要是透過後端支援 Brotli 的方式傳回不同的資料,再加上 Vary: Accept-Encoding 的設定讓 CloudFront 針對不同的 Accept-Encoding 分開 cache。

這次的支援等於是讓 CloudFront 理解 Brotli,就可以提昇 hit rate 並且降低後端的壓力:

Prior to today, you could enable Brotli compression at the origin by whitelisting the 'Accept-Encoding' header. Now CloudFront includes 'br' in the normalized 'Accept-Encoding' header before forwarding it to your origin. You no longer need to whitelist the 'Accept-Encoding' header to enable Brotli origin compression, improving your overall cache hit ratio. Additionally, if your origin sends uncompressed content to CloudFront, CloudFront can now automatically compress cacheable responses at the edge using Brotli.

算是補產品線...

CloudFront 支援 TLS 1.3

看到 AWS 的公告,宣佈 CloudFront 支援 TLS 1.3:「Amazon CloudFront announces support for TLSv1.3 for viewer connections」。

預設會自動啟用:

TLSv1.3 is available today and enabled by default across all Amazon CloudFront security policies options. No additional changes are required to your CloudFront configuration to benefit from the security and performance improvements of TLSv1.3 for your viewer connections.

對使用者最大的差異應該還是改善 first byte 的時間 (主要是因為 handshake 時間縮短),這點 AWS 的人也有提到在內部測試時,美國區的改善情況:

In our own internal tests in the US region as an example, first byte latency for new negotiated connections saw reductions of up to 33% for TLSv1.3 compared to previous versions of TLS.

在 latency 更高的地區應該也會有大幅改善...

Amazon Lightsail 也推出 CDN 服務了...

Amazon Lightsail 也推出 CDN 服務了:「Amazon Lightsail now offers CDN distributions to accelerate content delivery」。

這個服務是用 CloudFront 為底:

This native service, called Lightsail CDN, is backed by Amazon CloudFront, Amazon Web Services’ CDN platform that uses a global network of servers in over 200 locations across 42 countries to store and deliver your content throughout the world. Lightsail CDN distributions can be created and configured with just a few clicks for a low, predictable monthly price, and you can get started for free.

看了一下價錢,免費方案可以有 50GB/month,一般自己架個 WordPress 之類的 blog 應該是可以涵蓋在內。

付費方案中,USD$10/month 可以給 200GB,但 USD$35/month 只能給 500GB?這邊是用愈多愈貴,沒看懂這個定價方式啊...

但看起來是有不少機會比 CloudFront 便宜 (如果非歐美的流量不少的話),再來就是 Lightsail CDN 這邊沒有列出每個 request 的費用,所以應該是不算這塊?這樣小檔案很多的話應該也是個選擇?

Amazon Lightsail 一直拿 AWS 自家東西出來市場上打架,現有的 VPS 不知道會怎麼提供類似的方案,搭 Cloudflare 嗎?或是找 Fastly 這些服務搭?(不過話說回來,Fastly 的牌價好貴 XD)

CloudFront 在印度的第六個區域:加爾各答

查了一下資料才發現,印度應該是僅次於北美的單一國家 CloudFront 最多點的地區:「Amazon CloudFront announces its first Edge locations in Kolkata and Hamburg」。

以「Amazon CloudFront Key Features」這頁列出的資料可以看到印度有第六個區域了:

Edge locations: Bangalore, India (3); Chennai, India (2); Hong Kong, China (3); Hyderabad, India (4); Kolkata, India; Kuala Lumpur, Malaysia (2); Mumbai, India (3); Manila, Philippines; New Delhi, India (4); Osaka, Japan; Seoul, South Korea (4); Singapore (4); Taipei, Taiwan(3); Tokyo, Japan (16)

不過如果以節點總數來說的話,印度與日本都是 17 個 (德國是 16 個),而且光東京這區就 16 個,這又更感覺得出網路重鎮的味道...

CloudFront 的新拓點...

Amazon CloudFront 這次公告增加了新的節點,都是該地區的第一個點,可以大幅降低 latency:「Amazon CloudFront launches in five new countries - Bulgaria, Greece, Hungary, Kenya, and Romania」。

這種點就是拿來認地名的,這波算是比較熟悉的... 保加利亞、希臘、匈牙利、肯亞、羅馬尼亞,拉維基百科的資料:

保加利亞共和國(保加利亞語:Република България) 通稱保加利亞,是位於歐洲東南部巴爾幹半島上的一個國家。它與羅馬尼亞、塞爾維亞、北馬其頓、希臘和土耳其接壤,東部濱臨黑海。

希臘共和國(希臘語:Ελληνική Δημοκρατία,希臘語發音:[eliniˈci ðimokraˈti.a])[8][9],通稱希臘(希臘語:Ελλάδα,希臘語發音:[eˈlaða]),是位於歐洲東南部的跨大洲國家。2019年其人口為1,080萬。雅典為希臘首都及最大城市,塞薩洛尼基為第二大城市。

匈牙利(匈牙利語:Magyarország),是一個位於中歐的內陸國家[10],但是長期和東歐、南歐歷史有關聯。匈牙利與奧地利、斯洛伐克、烏克蘭、羅馬尼亞、塞爾維亞、克羅埃西亞和斯洛維尼亞接壤,人口976萬,首都為布達佩斯。官方語言為匈牙利語,這是歐洲最廣泛使用的非印歐語系語言[11]。

肯亞共和國(斯瓦希里語:Jamhuri ya Kenya,英語:Republic of Kenya,/ˈkɛnjə/,或/ˈkiːnjə/) 通稱肯亞,是位於東非,瀕臨印度洋,與索馬利亞、衣索比亞、南蘇丹、烏干達、坦尚尼亞接壤,面積約58萬平方公里[2]。肯亞人口約5051萬,一共有42個民族[8],分成班圖、尼羅和庫施特三大語系[9],官方語言是英語和斯瓦希里語。全國分為47個縣市[2],首都為奈洛比[10]。

羅馬尼亞(羅馬尼亞語:România),位於歐洲東南部。羅馬尼亞國境西方分別為匈牙利與塞爾維亞接壤,保加利亞在南方,北方與東北方則是烏克蘭與摩爾多瓦共和國。羅馬尼亞有一小段位於黑海邊的海岸線,多瑙河幾乎佔了南邊與保加利亞之間的國界大半,並且從該國東邊海岸流入黑海的西岸。羅馬尼亞的首都為布加勒斯特,位於該國南部多瑙河支流登博維察河所流經的平原地帶上,是羅馬尼亞第一大城與工商業城市。

所以是東歐、東南歐、中歐、東非、東南歐...

CloudFront 的 access log 多了一些欄位

CloudFront 的 access log 多了一些欄位可以抓:「Amazon CloudFront now provides seven new data fields in access logs」。

官方這次加了七個欄位,看起來後面六個都還蠻有用的... (第一個 c-port 是 client 的 port,目前只想的到 debug 時可以拿出來看...)

而第二個的 time-to-first-byte 可以拿來分析效能,這是從 CloudFront 的角度來看的。

第三個的 x-edge-detailed-result-type 是錯誤時的處理,讓管理者可以從 access log 直接粗略分析。

剩下的四個都是跟 content type 與 length/range 有關,之前居然沒有嗎...

CloudFront 的 BBR 效能提昇

這是在找一些 TCP congestion algorithm 相關的資訊時發現的,看起來 Amazon CloudFront 導入 BBR 一陣子了:「TCP BBR Congestion Control with Amazon CloudFront」。

不過 BBR 被研究的愈來愈多,大家開始發現這個演算法的霸道,跟其他的 TCP congestion algorithm 並不太能和平共存,但這就跟軍事武器一樣,隔壁升級了你就得跟著升級,抱怨沒有用,只會被消滅...

AWS 官方推出 WordPress 整合套件

AWS 自己推出了跟 WordPress 的整合套件:「Accelerating WordPress with CloudFront using the AWS for WordPress Plugin」、「AWS for WordPress plugin now available and with new Amazon CloudFront workflow」。

這次的套件主要是將 Amazon CloudFront 整合進 WordPress:

Amazon Web Services announces the general availability of the AWS for WordPress plugin. Previously known as the Amazon Polly and Amazon AI plugin, the new AWS for WordPress plugin now provides a workflow to configure an Amazon CloudFront distribution that is highly optimized for WordPress websites.

如果想要都控制在自己手上,AWS 算是提供了一個官方的方案,也應該有一定的支援。不過大多數人還是會拿 Cloudflare 的免費方案吧...