IRCCloud 的檔案上傳功能...

IRCCloud 宣佈的新功能:「File Uploads」。

CloudFront 擋在前面,而且不是 Price Class 100 (因為 mtr 時至少有看到亞洲區的 PoP),不過看起來後面不是 S3...

在公告的文章裡有提到 Imgur,現在 Imgur 的 CDN 品質好像不是很好?台灣連過去用的是 Fastly 美國的點,但選點好像不太行啊?不過算是堪用...

Amazon CloudFront 允許帶有路徑的 Origin Name 了

剛剛看到的,Amazon CloudFront 允許 Origin Name 帶有 path 了:「Amazon CloudFront Now Allows Directory Path as Origin Name」。

For example, if you're using an Amazon S3 bucket as your origin, you can specify bucket-name.s3.amazonaws.com/production instead of just bucket-name.s3.amazonaws.com. Alternatively, if you have a custom web server with different content in different directories on the server, you can use the same physical server to serve multiple types of content via multiple CloudFront cache behaviors or distributions.

變得更方便,以往是直接開兩個不同的 bucket 放。

AWS 對外頻寬與 CloudFront 頻寬降價

AWS 在「AWS Data Transfer Price Reduction」這邊宣佈降價,回朔至 2014 年 12 月 1 日開始計算。

分成一般 Outbound 與 CloudFront Outbound 部份。

一般 Outbound 的部份,US/EU 主要降價的部份是一開始的流量 (10TB 以下的部份),亞洲區的部份主要是新加坡降價特別多,大概是把量養出來了?

CloudFront Outbound 的部份主要也是在 10TB 以下的部份。

另外一個比較特別的地方 (但也許沒有太大差異),是 CloudFront 往 origin 抓資料時,如果 origin 在 AWS network 內就不計算費用 (包括了 S3EC2)。

如果暫時先不考慮 per request 費用,會注意到 US/EU 一般 Outbound 的費用是 USD$0.90/GB,而 CloudFront 是 USD$0.85/GB,量更大的時候會更明顯?

馬上想到 Netflix 這種單一 request 會有巨大流量的用法會隨著這次計費方式改變而有變化?

AWS 官方提供 Public IP 清單 (JSON 格式)

以往 AWS 都是在 forum 上發表,現在居然提供 JSON 了:「AWS Public IP Address Ranges Now Available in JSON Form」,在 https://ip-ranges.amazonaws.com/ip-ranges.json 這邊,對應的說明在「AWS IP Address Ranges」這邊。

除了 EC2 以外,裡面包含了 CDN (CloudFront) 的範圍:

Valid values for the service key include "AMAZON", "EC2", "ROUTE53", "ROUTE53_HEALTHCHECKS", and "CLOUDFRONT." If you need to know all of the ranges and don't care about the service, use the "AMAZON" entries. The other entries are subsets of this one. Also, some of the services, such as S3, are represented in "AMAZON" and do not have an entry that is specific to the service. We plan to add additional values over time; code accordingly!

目前大約是一千萬個可用 IP。

設定 CloudFront 的 Wildcard SSL (SNI)

不知道為什麼網路上一堆文章寫的超複雜 XD

目前必須使用 CLI 才能上傳 key 與 SSL certificate,所以乖乖的裝上 aws-cli 吧 :p

而通常在買 Wildcard SSL 時會 *.example.com 的時候會簽成 example.com + *.example.com,這時候用 example.com 當名字掛進去:

aws iam upload-server-certificate --server-certificate-name example.com --certificate-body file://server.crt --private-key file://server.key --certificate-chain file://intermediate.crt --path /cloudfront/

一樣可以確認:

aws iam get-server-certificate --server-certificate-name example.com

會改到的幾個部份用粗體標出來了。

上傳完成後就可以到 Web Console 上的 CloudFront 部份設定了。

主要是參考「Building a CDN over SSL with CloudFront and SNI」這篇文章的說明,再加上一些亂試後去翻文件確認的結果 :o

CloudFront 對 POODLE 的安全性更新

CloudFront 的進一步更新出來了,剛剛看到信件通知。分成兩種 case,一種是使用 dedicated IP 服務的人,一種是使用 *.cloudfront.net 的人。

使用 dedicated IP 的人仍然可以打開 SSLv3,不過 CloudFront 建議在 use case 允許下不要開:

If you are using the Dedicated IP Custom SSL Certificates to serve SSL traffic, you may configure whether your distribution accepts SSLv3 connections. We have added an option to select this in both the console and the API. For existing distributions that use Dedicated IP Custom SSL, the default value for this new setting will be to allow SSLv3, so you will need to update your distributions if you want to disallow SSLv3. We do recommend that customers disable SSLv3 if their use case allows it.

使用 *.cloudfront.net 預定在 2014/11/03 之後就會關閉 SSLv3:

Additionally, starting on November 3rd, 2014, we will begin disabling SSLv3 for ALL customers who use SSL with the default CloudFront domain name (*.cloudfront.net). If you believe that this policy will negatively affect your website or application, please contact us as soon as possible so that we can discuss your options: https://aws.amazon.com/forms/poodle_sslv3

而使用 SNI 的人不需要管這件事情,因為這代表你已經是用 TLS 了:

If you're using Custom SSL Certificates and Server Name Indication (SNI), you don’t need to take any action because, as SNI-Only Custom SSL distributions already did not allow SSLv3 connections.

CloudFront 統計資料繼續改善...

半年多前 CloudFront 在 web console 上實做了統計資訊:「Amazon CloudFront 可以從 Web Console 上看到統計資料了」,而今天可以看到更多東西了:「CloudFront Update - Trends, Metrics, Charts, More Timely Logs」。

首先是確保收到 log 的時間差,目前可以確保一個小時內會收到 log:

With these changes, the newest log files in your bucket will reflect events that have happened as recently as an hour ago.

再來是多了 cache 分析:

以及熱門物件統計資訊:

也是其他 CDN 業者都已經有的功能,算是在補 :p

查看各家 CDN 在各地的狀態

Cedexis 的「Real time data for real time decisions」蒐集了各家 CDN 在各地的連線資訊,包括了 response time、throughput 這些資訊,能夠解讀的話對於事前分析會很有幫助。

舉個例子來說,泰國地區 2014/10/20 的數字如下圖。

先從 latency 的部份開始看,可以看到 AkamaiCDNetworks 的速度分別是 52ms 與 63ms,可以合理猜測都是在泰國當地有 PoP 直接服務。而 LimelightCloudFront 要 98ms 與 111ms,看起來最少是新加坡或是香港?

而 availability 的部份也可以看出來國內線路的優勢,只要一跨國就不好維持。

這樣就可以針對需求而決定要找哪幾家 CDN 業者來談。在找 CDN 業者實際測試前,先看看這邊的資料會是很不錯的資訊,可以省下不少白工。

CloudFront 與 Route53 在澳洲多了墨爾本機房

Route 53CloudFront 在澳洲啟用第二個機房,墨爾本:「New Location for CloudFront and Route 53 - Melbourne, Australia」。

Google Maps 拉發現墨爾本與雪梨之間的直線距離大約七百公里,的確是應該多拉個點...

Amazon CloudFront 的新增功能

Amazon CloudFront 新增了 Whitelist Header 的功能:「Deliver Custom Content With CloudFront」。

如同在 post 裡說明的:

If you choose the Whitelist option, each header that you add to the list becomes part of the cache key for the URLs associated with the distribution.

有點像是 HTTP 協定裡 Vary 想要解決的問題,只是做在 CDN 這端。這個功能蠻多 CDN 都有,AWS 總算補上了...

這次除了可以針對 custom HTTP header 處理外,CloudFront 還做了不少事情:

  • Mobile Device Detection
  • Geo-Targeting
  • Multi-Site Hosting
  • Protocol Detection
  • CORS (Cross Origin Resource Sharing)

前兩項還蠻有意義的,這代表會有人幫你更新資料。而 CloudFront 總算是支援 CORS 了...