Amazon CloudFront 在德國法蘭克福的 Edge 數量增加到五個...

看到 Amazon CloudFront 這個公告,在同一個地區增加到五個點:「Announcing Two New Edge Locations in Frankfurt, Germany for Amazon CloudFront」。

隔壁的法國則是分散到兩個地區:

Marseille, France
Paris, France (2)

日本也類似:

Osaka, Japan
Tokyo, Japan (2)

其他地區最多都三個點,第一次看到變五個點的:

Frankfurt, Germany (5)

沒考慮柏林或是漢堡嗎...

Amazon Aurora 支援 Reader Endpoint

Amazon Aurora 支援 Reader Endpoint,讓讀的部份可以打散掉:「New Reader Endpoint for Amazon Aurora – Load Balancing & Higher Availability」。

讀的部份比較容易 scale (常見的方式是透過 replication 做到),而現在很多 database framework (包括各類的 ORM framework) 都支援讀寫分離,這個支援對於系統的 scale 來說幫忙頗大。

不過不知道會不會有 replication lag 的問題,我猜是會有...

Amazon CloudFront 的 HTTP/2

Amazon CloudFront 總算是支援 HTTP/2 了:「New – HTTP/2 Support for Amazon CloudFront」。

比較需要注意的是,CloudFront 所用到的 Certificate Manager 必須開在美西的 us-east-1 才能讓 CloudFront 吃到設定,剛剛誤開在 us-west-2 上,結果回到 CloudFront 頁面上沒找到...

不過 CloudFront 的問題還是在於 latency 不穩定,HTTP/2 應該是可以降低 latency 不穩定帶來的影響,但畢竟還是有影響...

Auto Scaling 可以拉 EC2 Spot Instance 進來用了

Update:auto scaling 在 2012 就支援 spot instance 了:「EC2 Spot Instance Updates – Auto Scaling and CloudFormation Integration, New Sample App」,我一直有 auto scaling 不支援的印象... 這次是支援 EC2 Spot Fleets (i.e. 以 capacity 為主的架構,將兩台 c4.4xlarge 與一台 c4.8xlarge 當作是有相同 capacity 來喊價)。

AWSAuto Scaling 宣佈支援 Spot Instance 了:「New – Auto Scaling for EC2 Spot Fleets」。

雖然文章主要都是以 worker 之類的應用來做,但可以看到還是有說 web service:

Web Service – Scale web services based on measured response time and average requests per second.

我猜官方還是不建議這樣用,所以整篇文章都還是以 worker 類為主。應該是因為 web service 直接對使用者,用 Auto Scaling 不一定開的起來,反而有可能會爆炸 XD

CloudFront 支援將 Query String 內的特定 Key/Value 當作 Cache Key 的一部分

Amazon CloudFront 可以指定 query string 中的某個特定的 key/value 當做 cache key 的一部分了:「Announcing Query String Whitelisting for Amazon CloudFront」,對應的文件在「Configuring CloudFront to Cache Based on Query String Parameters」這邊可以查到。

先前只能針對選擇忽略掉整個 query string,或是把整個 query string 當作 cache key 的一部分,現在可以細部調整了。

最簡單的應用可以用在 css/js 的 asset 上,針對 v=\d+ 當作 cache key 的一部分,而其他的參數可以忽略,不過這好像沒什麼特別的意義。

目前想到比較有意義的應用是針對 dynamic content 多了一些籌碼可以用,像是 Slack 把整個網站放上 CloudFront 後,應該會有很多 API 是透過 query string 傳遞參數,而這次的改變讓 CloudFront 可以細部調整。

Ruby 上使用 DynamoDB 的函式庫:aws-record

AWS 正式發表了在 Ruby 上使用 DynamoDB 的 library:「Announcing General Availability of aws-record」。

GitHub 連結在「aws/aws-sdk-ruby-record」,而 Ruby Gems 的連結在「aws-record」。

這樣用起來更簡單了...

Amazon S3 開放 IPv6 存取

開放 IPv6 存取 Amazon S3 了:「Now Available – IPv6 Support for Amazon S3」。

對應的 Endpoint 是 http://BUCKET.s3.dualstack.REGION.amazonaws.comhttp://s3.dualstack.REGION.amazonaws.com/BUCKET

值得注意的是所有功能都開放 IPv6 了,包括 BitTorrent (還記得嗎 XDDD 如果忘記的,可以參考「Using BitTorrent with Amazon S3 這篇的說明」):

S3 Feature Support – IPv6 support is available for all S3 features with the exception of Website Hosting, S3 Transfer Acceleration, and access via BitTorrent.

Update:寫太快發現早上匆匆忙忙出門寫錯了,是「不支援」,感謝 Twitter 上被提醒了:

接下來是等 Amazon EC2Amazon CloudFront 的支援...

AWS 的 ALB (Application Load Balancer)

前幾天跟 AWS 的人開會的時候得知 ALB 的 beta program,今天就看到正式公開的消息了:「New – AWS Application Load Balancer」。

最主要的是對 WebSockets 與 HTTP/2 的支援,這個需求都喊很久了:

WebSocket allows you to set up long-standing TCP connections between your client and your server. This is a more efficient alternative to the old-school method which involved HTTP connections that were held open with a “heartbeat” for very long periods of time. WebSocket is great for mobile devices and can be used to deliver stock quotes, sports scores, and other dynamic data while minimizing power consumption. ALB provides native support for WebSocket via the ws:// and wss:// protocols.

HTTP/2 is a significant enhancement of the original HTTP 1.1 protocol. The newer protocol feature supports multiplexed requests across a single connection. This reduces network traffic, as does the binary nature of the protocol.

另外是 url routing,不過目前看起來只能設 10 條,我猜可以問問能不能加吧:

An Application Load Balancer has access to HTTP headers and allows you to route requests to different backend services accordingly. For example, you might want to send requests that include /api in the URL path to one group of servers (we call these target groups) and requests that include /mobile to another. Routing requests in this fashion allows you to build applications that are composed of multiple microservices that can run and be scaled independently.

As you will see in a moment, each Application Load Balancer allows you to define up to 10 URL-based rules to route requests to target groups. Over time, we plan to give you access to other routing methods.

再來是改善了之前抱怨很多的 health check:

Application Load Balancers can perform and report on health checks on a per-port basis. The health checks can specify a range of acceptable HTTP responses, and are accompanied by detailed error codes.

改進了不少東西...

Amazon CloudFront 加拿大機房 (然後順便提一下 CloudFlare...)

Amazon CloudFront 增加了加拿大的點:「Amazon CloudFront Expands to Canada」,一次開了兩個機房:

I am happy to announce that we are adding CloudFront edge locations in Toronto and Montreal in order to better serve our users in the region, bringing the global count up to 59 (full list).

價錢跟美國一樣,但是流量是分開計算累計值的:

總算記得加拿大這個國家了 XDDD

另外一個是昨天發現 CloudFlare台灣固網 (以及台灣大哥大用戶) 已經直連了,看起來是六月底的時候就通了,只是一直沒注意到:

這樣台灣主要的 ISP 對 CloudFlare 都有直連了...

Netflix 把金流相關的系統轉移到 AWS 上跑 MySQL 的故事...

這次要提的是「Netflix Billing Migration to AWS」、「Netflix Billing Migration to AWS - Part II」與「Netflix Billing Migration to AWS - Part III」這三篇。

Netflix 先前的金流相關系統跑的是 Oracle 的資料庫:

然後換成 MySQL

系統上是採用 DRBD,然後底層是 5 個 4TB 的 EBS 組成的 RAID 0,跑 LVM

High performance with respect to reads and writes was achieved by using RAID0 with EBS provisioned IOPS volumes. To get more throughput per volume, 5 volumes of 4TB each were used, instead of 1 big volume. This was to facilitate faster snapshots and restores.

LVM to manage two Logical Volume’s (DB and DRBD Metadata) within single Volume Group.

可以看到裡面用的都是很經過時間考驗的技術,像是 DRBD、標準的 Replication 架構...