AWS CloudFront 可以用自己的 SSL Certificate 了...

以往 CloudFront 只能用 *.cloudfront.net 當作 SSL domain,但在今天公告的「Custom SSL Domain Names and Root Domain Hosting for Amazon CloudFront」這篇說明內,宣佈可以上傳自己的 SSL certificate 使用了。

目前的價錢是 USD$600/month,不過是以小時計算。即使拋開錢的問題,在 CloudFront 已經支援 SSL 的前提下 (而且因為是 *.cloudfront.net,理論上是 cookie-free domain),技術面上暫時想不到什麼好處... 在 DNS 端自己混合多家 CDN 是個可能的方向?

在 InnoDB 下的 COUNT(*)...

MyISAM 在讀取時不會有其他人可以寫入,所以 COUNT(*) 很容易被處理。而 InnoDB 的 COUNT(*) 在不同的 transaction 裡可能會不一樣,如果硬要處理的話會變得複雜,所以目前 InnoDB 的作法是 scan 一次 (出自「Limits on InnoDB Tables」):

InnoDB does not keep an internal count of rows in a table because concurrent transactions might "see" different numbers of rows at the same time. To process a SELECT COUNT(*) FROM t statement, InnoDB scans an index of the table, which takes some time if the index is not entirely in the buffer pool. If your table does not change often, using the MySQL query cache is a good solution. To get a fast count, you have to use a counter table you create yourself and let your application update it according to the inserts and deletes it does. If an approximate row count is sufficient, SHOW TABLE STATUS can be used. See Section 14.3.14.1, "InnoDB Performance Tuning Tips".

在「Easy SELECT COUNT(*) with split()」這篇提到 InnoDB 下 COUNT(*) 這件事情,當你不需要絕對精確的值時,可以利用 INFORMATION_SCHEMA.TABLES 或是 SHOW TABLE STATUS 的資訊來判斷。

MySQL HA 的選擇...

Percona 把常見的 MySQL High Availability 選擇整理後發表成 Webinar,投影片在這裡可以看到 (以及下載):「Choosing a MySQL High Availability Solution」。

沒有太多新的東西,主要還是再次描述 MySQL HA 這塊目前沒有萬靈丹,常見的這幾個方案各有自己的優缺點,會依照環境與需求而產生不同的選擇。裡面連 manual failover + 24x7 NOC 都出現了... XD

對於不清楚有哪些 HA 架構的人,可以透過這份投影片先抓出關鍵字。對於聽過一堆 HA 架構的人,想要複習各種方式的優缺點,也可以花時間看看。至於想要找萬靈丹的人就不用花時間了,目前沒這東西 :p

IBM 買 SoftLayer...

在「IBM Acquiring SoftLayer to Boost its SmartCloud」這邊看到 IBM 已經跟 SoftLayer 達成協議了,依照法令公開的消息可以在 IBM 的官方網站上翻到:「IBM to Acquire SoftLayer to Accelerate Adoption of Cloud Computing in the Enterprise」。

SoftLayer 除了 Hosting 業務以外,也還包括 CDN 業務... 接下來會怎麼玩啊?

利用搜尋引擎找出 GitHub 上可以被 SQL injection 的程式...

Hacker News 熱門文章看到的連結。

方法是通用的,並不限於 PHPMySQL (不過 PHP 的條件相對容易搜 XDDD),連結是到第三頁:「Search · extension:php mysql_query $_GET」。

可以看到很多 $_GET 的參數直接被傳入 mysql_query() 內...

結果 Vim 7.3 出 patch level 1000 了...

前情提要:「Vim 7.4 準備中...」,本來以為會在 1000 出現前出 Vim 7.4。

結果剛剛在 Twitter 上看到「http://ftp.vim.org/pub/vim/patches/7.3/7.3.1000」出現,這是哪招... XD

Bram Moolenaar 該不會自暴自棄決定等 9999 的時候再出 Vim 7.4 吧... XD

AWS 的規模...

Netcraft 分析 Amazon Web Services 的規模,以及使用 AWS 的 Heroku:「Amazon Web Services' growth unrelenting」。

分析雖然只看了 HTTP 與 HTTPS 的部份,但以 AWS 的特性,應該是不差太多,所以相對性的數字應該是有參考價值的...

有這些資料後再來看:

雖然寫 4 month,但實際上應該是三個月的成長量 (二月到五月)。

us-east-1 仍然很強大 (還是沒看到 us-east-2 的消息),而 us-west-2 上個月突然有大戶進駐?跟東京與新加坡同個等級了...

另外 CloudFrontRoute 53 的成長數量也很耀眼,都是網站上設定好就可以馬上用,不需要找業務...

Yahoo! 買下 Tumblr...

Update:Tumblr 還沒有接受,目前是 Yahoo! 董事會已經同意這個金額,一切都還在談...

新聞報導在這:「Yahoo! Board Said to Weigh Billion-Dollar Tumblr Deal」,Yahoo! 以十一億美元現金買下 Tumblr

能期待 Flickr 與 Tumblr 的結合嗎?

不過如果按照 Yahoo! 的慣例,又會整合 Yahoo! 的帳號系統,好像就不怎麼好用了...

電擊腦袋加強數學能力...

Slashdot 上看到「Brain Zapping Improves Math Ability」,裡面提到基礎數學能力不好的人可以透過電擊腦袋改善... XD

原報導在「Trouble With Math? Maybe You Should Get Your Brain Zapped」這篇,論文資料在「Long-Term Enhancement of Brain Function and Cognition Using Cognitive Training and Brain Stimulation」(有 PDF 可以看)。

同樣的研究在兩年半前就被提出來:「Brain Zaps Improve Math」,不過兩年半前的研究並沒有找出在現實生活中的改善幅度:

However, it wasn't clear how those basic numerical skills would translate to real-world math ability.

不過這也不是永久有效... 每半年被電一次嗎 XD

Now, a new study suggests that a gentle, painless electrical current applied to the brain can boost math performance for up to 6 months.