OpenZFS 成立...

好幾個新聞來源都有看到 OpenZFS 成立:「OpenZFS Project Launches, Uniting ZFS Developers」(Slashdot)、「OpenZFS launch announcement」。

OpenZFS 的正式公告在「Announcement」這邊,雖然沒有明講是要脫離 Oracle 的控制,但宣示對社群更公開這點其實就很清楚了 (To encourage open communication about ongoing efforts to improve open source OpenZFS, ...)。

隔壁棚 Oracle 前員工 (現在在 Fusion-io) 弄出來的 Btrfs 的進展也不差,兩邊都在進步...

Amazon S3 上 Protected Content 的 URL Sign...

Amazon S3 可以在上傳時設定為 non-public,這種檔案如果要讓使用者讀取,就必須透過 URL 簽名的方式...

官方的文件是「Authenticating REST Requests」這篇,不過官方文件把所有細節都寫上去,如果第一次接觸的人反而不知道要怎麼辦...

Thomas Riboulet 給了一個 Quickstart 的範例:「Signing Amazon S3 URLs」,裡面雖然是 Ruby code,不過 code 的邏輯很簡單...

以 test.gslin.org 為例,想要產生出從現在開始 3600 秒內有效的 url 可以這樣寫,用過一次後再回去看官方文件,就會發現其實就是官方文件的「REST Authentication Example 3: Query String Authentication Example」這段,如果以 PHP 寫會長這樣:

<?php

$access_key = "";
$secret_key = "";

$timestamp = time() + 3600;
$data = "GET\n\n\n${timestamp}\n/test.gslin.org/test.txt";

$sign = urlencode(
    base64_encode(
        hash_hmac('sha1', $data, $secret_key, true)
    )
);

echo "http://test.gslin.org.s3.amazonaws.com/test.txt?" .
    "AWSAccessKeyId=${access_key}&" .
    "Expires=${timestamp}&" .
    "Signature=${sign}\n";

接下來來研究 CloudFront 的部份...

Percona XtraDB Cluster 5.5.33-23-7.6...

Percona XtraDB Cluster (Galera Cluster) 出新版:「Percona XtraDB Cluster 5.5.33-23.7.6 is now available」。

看到了幾個比較特別的功能:

Desync functionality has now been exposed to the client. This can be done either via /*! WSREP_DESYNC */ comment on the query or by setting the global wsrep_desync variable to 1.

這個功能感覺上是打算為了在 Percona Toolkit 裡面配合 pt-table-sync 而準備的?

另外一個重要的功能是限速,這可以避免在伺服器最忙碌的時候加重負擔造成伺服器撐不住:

Percona XtraDB Cluster has implemented new rate limiting, rlimit, option for XtraBackup SST that can be used to avoid saturating the donor node.

以往我是自己 patch 一個 shell script 出來用,現在則變成是原生支援,那麼本來的 patch 方式就要轉換到原生支援上...

然後文末有建議 Debian 使用者在升級前要先安裝 socat,避免升級發生問題 :o

Amazon CloudFront 支援 Wildcard 了...

Amazon CloudFront 在 CNAME 的地方可以填 *.example.com 表示這個 distribution 要吃所有 domain:「CNAME Wildcard Support for Amazon CloudFront」。

這用在 asset 類的服務很好用,可以設定 *.asset.example.com,然後就可以用 {1,2,3,4}.asset.example.com 打散掉。以往則是要手動設多個 domain,沒辦法隨便調整...

iOS 7 的下載與 Akamai...

剛好看到「By My Estimates, Apple’s iOS7 Download Business Is Worth About $10-$12M To Akamai」這篇,講到這次蘋果 iOS 7 的下載讓 Akamai 有一筆不小的收入...

正想要下載 VirtualBox,沒遇過 HiNet 機房的 Akamai 這麼慢... XD

gslin@GSLIN-DESKTOP [~/tmp] [13:31/W3] wget http://download.virtualbox.org/virtualbox/4.2.18/virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb
--2013-09-19 13:32:17--  http://download.virtualbox.org/virtualbox/4.2.18/virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb
正在查找主機 download.virtualbox.org (download.virtualbox.org)... 137.254.120.26
正在連接 download.virtualbox.org (download.virtualbox.org)|137.254.120.26|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 302 Moved Temporarily
位置:http://dlc.sun.com.edgesuite.net/virtualbox/4.2.18/virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb [跟隨連結]
--2013-09-19 13:32:18--  http://dlc.sun.com.edgesuite.net/virtualbox/4.2.18/virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb
正在查找主機 dlc.sun.com.edgesuite.net (dlc.sun.com.edgesuite.net)... 203.69.141.82, 203.69.141.10
正在連接 dlc.sun.com.edgesuite.net (dlc.sun.com.edgesuite.net)|203.69.141.82|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 64206462 (61M) [application/x-debian-package]
Saving to: `virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb'

2013-09-19 13:35:47 (301 KB/s) - `virtualbox-4.2_4.2.18-88780~Ubuntu~precise_amd64.deb' saved [64206462/64206462]

試了幾次,有些還會導到美國機房分流... 量真的太大了 :o

Diablo III 將移除拍賣場 (包含了現金交易市場以及遊戲金幣交易市場)...

英文版的公告內容:「Diablo® III Auction House Update」,以及中文版的公告內容:「《暗黑破壞神®III》拍賣場最新消息」。

重點文字有兩段,第一段是說明未來的遊戲金幣交易以及現金交易將被移除:

With that in mind, we want to let everyone know that we've decided to remove the gold and real-money auction house system from Diablo III.

因此,我們想讓大家知道,我們已決定移除《暗黑破壞神III》的金幣拍賣場和現金拍賣場系統。

第二段的重點是中止的時間點:

Please note that the shutdown will occur on March 18, 2014. We will keep everyone informed as we work through this process.

請注意,拍賣場系統將會在2014年3月18日關閉。一旦有最新消息,我們將會另行通知大家。

Varnish 的 Super Fast Purger...

Reverse Proxy 的 Cache Infrastructure 在遇到 cache invalidate 都是很討厭的問題,不是不能做,而是效能不太好... 常見的作法是設計成不用 purge 的形式,只要是需要更新,就產生不同的 url,而舊的 url 在沒人 access 後會透過各種 Cache algorithms 自動回收掉,像是 LRU (Least Recently Used) 之類的演算法。

發展久了之後也因此衍伸出很多不同的架構,像是 groupcache 就是假設在同一個 address 的內容永遠不會變的前提。

Varnish Cache 這次發表的東西則是打算從根本問題解決,也就是想辦法讓 purge (cache invalidate) 的成本降低:「Simple scales better and faster in the real world」、「VAC 2.0.3 with high performance cache invalidation API (aka the Super Fast Purger)」。

官方的說法,在大台機器上可以到 60k reqs/sec:

Kristian nonchalantly mentioned that the Super Fast Purger did 60,000 requests per second, on a 6 core Xeon with 36GB memory, traffic over a gigabit network to a single Varnish Cache server, with httperf as test client. But we believe the Super Fast Purger can do a lot more with a little love and tuning.

Squid 效能不好,ATS 的文件很傷,是該找時間來測試看看...

PostgreSQL 9.3...

前幾天 PostgreSQL 宣佈 9.3 發佈:「PostgreSQL 9.3 released!」。

如同預測的,9.3 對 JSON 的處理能力變強了,加上可以自訂 index (寫 function 自訂 index 的內容),這使得 PostgreSQL 可以做 JSON-based document database,可以參考 9.3 的「PostgreSQL: Documentation: 9.3: JSON Functions and Operators」以及前一版 9.2 的「PostgreSQL: Documentation: 9.2: JSON Functions」。

MongoDB 就別來亂了... XD

Jeremy Cole 在 XLDB 2013 上的演講:「The MySQL Ecosystem at Scale」

GoogleJeremy ColeXLDB 2013 (Extremely Large Databases) 上的演講投影片:「The MySQL Ecosystem at Scale」(PDF)。

投影片內對於 MySQL 的歷史以及現況的說明的很清楚,另外就是 sharding 那塊的方式很值得看一看,量大之後大家解決的方法都差不多,算是已經被證實可行的方法了。

掃整個 Internet 的 Port 22...

平常都是掃 Port 80/443,然後就有人跑去掃 Port 22:「We scanned the Internet for port 22」。依照原文說的,這次給的數據只是 60% 的 Internet,其他 40% 的資料有問題,他要再想辦法修...

這是 Top 20 的 unique banner 數據:

 1730887 SSH-2.0-OpenSSH_4.3
 1562709 SSH-2.0-OpenSSH_5.3
 1067097 SSH-2.0-dropbear_0.46
  824377 SSH-2.0-dropbear_0.51
  483318 SSH-2.0-dropbear_0.52
  348878 SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
  327841 SSH-1.99-Cisco-1.25
  320539 SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze3
  318279 SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
  307028 SSH-2.0-ROSSSH
  271614 SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
  233842 SSH-2.0-OpenSSH_5.1p1 Debian-5
  225095 SSH-2.0-OpenSSH_5.1
  224991 SSH-2.0-OpenSSH_5.1p1 FreeBSD-20080901
  213201 SSH-2.0-OpenSSH_4.7
  209023 SSH-2.0-OpenSSH_6.0p1 Debian-4
  195977 SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7
  140809 SSH-2.0-dropbear_0.50
  135821 SSH-2.0-OpenSSH
  132351 SSH-2.0-Cisco-1.25

可以看到 OpenSSH 是最大宗,而 dropbear 應該是各種 box 的量撐起來的...

參考維基百科上 OpenSSH 的條目,OpenSSH 的各版本的發行日期分別是:

  • 3.5:2002/10/14 (FreeBSD 4.11)
  • 4.3:2006/02/01
  • 4.7:2007/09/04
  • 5.1:2008/07/21
  • 5.3:2009/10/01
  • 5.4:2010/03/08 (FreeBSD 8.3)
  • 5.5:2010/04/16 (Debian 6)
  • 5.7:2011/01/24
  • 5.8:2011/02/04 (FreeBSD 9.1)
  • 5.9:2011/09/06
  • 6.0:2012/04/22 (Debian 7)
  • 6.1:2012/08/29 (FreeBSD 8.4)

後面的作業系統是就手上有的機器來看,不過 4.3 是最多的是怎麼一回事呢... 作者這樣解釋:

Note that these counts are a bit off. Some networks have a router that forwards all connections of a certain port to a single machine. Maybe "OpenSSH_4.3" is most popular banner, or maybe the national ISP of Elbonia just reroutes all port 22 requests.

所以有可能只是個假象?XD