Amazon RDS 提更完整的監控機制

這次 Amazon RDS 發表了更細的監控機制,包括了 MySQL 5.6、MariaDBAurora 這幾個產品線:「New – Enhanced Monitoring for Amazon RDS (MySQL 5.6, MariaDB, and Aurora)」。

rds_full_metrics_list_2

差不多是 SmokePing 可以提供的範圍,算是補的更齊全,讓找問題時的資料更多。不過顆粒細度可以到一秒鐘:

rds_enable_enhanced_monitoring_2

不過要注意的是,t1.micro 與 m1.small 不支援:

It works for MySQL 5.6, MariaDB, and Amazon Aurora, on all instance types except t1.micro and m1.small.

Google 宣佈再更進一步加強對 HTTPS 頁面的支援

Google 在「Indexing HTTPS pages by default」這邊宣佈了對 HTTPS 更進一步的支援。

只要是 HTTPS 與 HTTP 內容相同,而且沒有被阻擋 (透過 /robots.txt 之類的),就會優先索引 HTTPS 版本的頁面。

另外也發現 blogspot.com 支援 HTTPS 了...

AWS 推出 t2.nano

AWS 推出了 t2.nano:「EC2 Update – T2.Nano Instances Now Available」。

只有 512MB 記憶體,拿來跑超小的東西還可以:

Each t2.nano instance has 512 MiB of memory and 1 vCPU, and can run 32 or 64 bit operating systems and applications. They support EBS encryption and up to two Elastic Network Interfaces per instance.

在存滿錢後 (t2 的特性) 可以全速跑 72 分鐘,不過一開始就有 30 credits 可以用,跟其他 t2 的機器不太一樣,算是賣點之一

The t2.nano offers the full performance of a high frequency Intel CPU core if your workload utilizes less than 5% of the core on average over 24 hours. You get full access to the CPU core when needed, as long as you maintain a positive CPU credit balance. Each newly launched t2.nano starts out with a CPU credit balance of 30 credits, and earns 3 more credits per hour, up to a maximum of 72. This means that each instance can burst to full-core performance for up to 72 minutes at a stretch.

找機會來測試看看跟 t2.micro 的差異好了...

V8 Engine 的 Math.random() 在新版被重寫了...

先前在「V8 的 Math.random() 亂度不足的問題」提到 Math.random() 因為使用 MWC1616 (Fast random number generation using 128 bit multimedia extension registers on Pentium class machines) 而不夠亂的問題。

這個問題在新版 V8 Engine 提出改善了:「There's Math.random(), and then there's Math.random()」。

Untitled drawing

新實作的方法是 xorshift128+,擁有極長的 period length:

This has been pointed out to us, and having understood the problem and after some research, we decided to reimplement Math.random based on an algorithm called xorshift128+. It uses 128 bits of internal state, has a period length of 2128 - 1, and passes all tests from the TestU01 suite.

將會在 Google Chrome 49 (目前是 47) 引入:

The new implementation landed in V8 4.9.41.0 within a few days of us becoming aware of the issue. It will become available with Chrome 49. Both Firefox and Safari switched to xorshift128+ as well.

同時還是再次提醒,這不是 CSPRNG,要用在密碼學相關應用還是要用專門的 library 來產生 pseudo random number:

Make no mistake however: even though xorshift128+ is a huge improvement over MWC1616, it still is not cryptographically secure.

AWS 推出 NAT Gateways

每次遇到 AWS 業務就會抱怨的功能總算推出來了,VPC NAT Gateways:「New – Managed NAT (Network Address Translation) Gateway for AWS」。

與自己用 EC2 架設的不同點在於處理的流量也要計費,但好處是以前得自己處理 HA,現在 AWS 幫你做掉這塊,不過 scalability 還是限制在 10Gbps:

The gateway has built-in redundancy for high availability. Each gateway that you create can handle up to 10 Gbps of bursty TCP, UDP, and ICMP traffic, and is managed by Amazon. You control the public IP address by assigning an Elastic IP Address when you create the gateway.

要注意的是流量計費這塊收費很貴 (非常貴),有大量連外需求的機器,還是用 public ip 直接連外會比較省,或是用老方法自己架設 NAT instances 處理。

CloudFront 總算支援 gzip 壓縮了...

CloudFront 總算是宣佈支援 gzip 壓縮了:「New – Gzip Compression Support for Amazon CloudFront」。

cloudfront_console_compress_option_1

不過在「Serving Compressed Files」文件裡提到,CloudFront 有可能不壓縮 (居然還有這種的...):

CloudFront is busy

In rare cases, when a CloudFront edge location is unusually busy, some files might not be compressed.

另外看起來也沒辦法指定壓縮哪些 Content-Type,只能用選好的值。

JavaScript Errors Notifier 移除 FairShare 了

先前提到 JavaScript Errors Notifier 裡有 FairShare 的問題:「改用沒有 FairShare 版本的 JavaScript Errors Notifier」。

剛剛在 Urgent: Make javascript-errors-notifiers less invasive 這邊看到作者已經從 Google Web Store 上面的版本拿掉 FairShare 了:

And yes, it was completely removed.

另外也得到一些數字:

This decision is about -$5000 of my yearly income, but, anyway, it makes me feel better :)

cron 裡面的百分比符號 % 有特殊意義...

在試了一陣子後才發現的問題,crontab 裡的百分比符號 % 是特殊字元:「escaping double quotes and percent signs (%) in cron」。

取自 Debian 上的 crontab(5)

Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.

有點奇怪就是了,因為有 echo 可以用才對?

Amazon Redshift 的新功能 (BZIP2)

Amazon Redshift 也推出了好幾個新功能,不過有個有點奇怪的壓縮格式 bzip2 出現了:「Amazon Redshift announces tag-based permissions, default access privileges, and BZIP2 compression format」。

BZIP2 data format: The COPY command now accepts data in BZIP2 compression format, in addition to GZIP and LZOP formats, when loading data into Amazon Redshift. Refer to Data Format Parameters for more details.

既然出了 bzip2,為什麼不一起出個效率與壓縮率都更好的 xz?但不管怎樣,總是多了一個壓縮率再更高一點的選擇... @_@

更簡單設定 Route53 的方式:Route53 Traffic Flow

AWS 每個產品最近都丟出好多東西 (因為年底要到了嗎?),這次是 Amazon Route53 透過拖拉界面簡化 DNS 的設定:「New – Route 53 Traffic Flow」。

可以從這幾張畫面看出來 Traffic Flow 的用法:

r53_create_endpoint_1

r53_weighted_rule_1

r53_failover_rule_1

看畫面的資訊,功能都是本來在 Route53 上就有的,這次是設計界面讓使用者在 AWS Management Console (也就是 Web Console) 上更容易設定進階的分流。