關於 iOS 9 的 Content Blocker

在「An hour with Safari Content Blocker in iOS 9」這邊提到了「An hour with Safari Content Blocker in iOS 9」這篇文章。

文章裡提到:

They have super tiny 'close' buttons that are near impossible to hit, they follow you as you scroll and there is a slow loading full page interstitial that loads on every page refresh. Urgh! Anyway...

在這兩張圖 (Before & After) 說明了很多效果:

而網頁讀取速度從 11 秒變成 2 秒...

蘋果在 WWDC 2015 上的說明則可以在「Safari Extensibility: Content Blocking and Shared Links」這邊看影片。

Flickr 用 GPU 產生縮圖

Flickr 說明了用 GPU 產生縮圖的技術:「Real-time Resizing of Flickr Images Using GPUs」。

這邊可以看到是透過 apache module 再轉到 resize worker:

成果就是讓縮圖的產生時間縮短很多,以 2048px 轉到 1600px 為例,速度快了 15 倍,即使是與 Yahoo 自己最佳化過的版本相比,也快了 10 倍:

而 GPU-based 的架構每台 server 可以支撐 300 resizes/sec:

Equally noteworthy, at peak load, each resize server can perform over 300 resizes per second.

關閉 OS X Yosemite (10.10) 的平滑捲動

2011 年的時候寫了一篇「關掉 Mac OS X 上的平滑捲動...」,而昨天發現用了四年的 MBA 壞了,今天買了新的 MBPR 後發現原來的方法已經找不到對應的地方設定了...

查到「Disable Smooth Scrolling in Mountain Lion」這篇的說明,用這個指令就可以關閉:

defaults write -g NSScrollAnimationEnabled -bool false

恢復的方法把 false 改成 true 即可。

支援多 CPU 的 ab:wrk

在「wrk」這邊看到 wrk 這個工具:「Modern HTTP benchmarking tool」。

利用 multi-threading 與 epoll/kqueue 撐出效能:

wrk is a modern HTTP benchmarking tool capable of generating significant load when run on a single multi-core CPU. It combines a multithreaded design with scalable event notification systems such as epoll and kqueue.

CloudFlare 的大阪 PoP

CloudFlare 宣佈在大阪建 PoP,將京阪神 (& 西側),以及名古屋地區納入服務範圍:「Osaka, Japan: CloudFlare's 35th data center」。

人剛好就在大阪,實際測試發現還是有些狀況。手機的部份還是會導到東京交換,住的地方也還是到東京交換。看起來還有不少 DNS resolver 的 IP 資訊要調整。

另外這也使得日本地區有完全異地備援的機制,如果東京機房出問題時可以透過大阪撐著,不需要跑到國外 (應該是香港 PoP)。

Let's Encrypt 的進度

Let's Encrypt 是個 CA (Certificate Authority),打算免費提供 SSL certificate,致力於普及網路加密技術。

由於 CA 是架構在稽核程序確保安全性,所以整個設置作業會非常長,最近總算快告一段落了。前幾天放出正式開放的時程:「Let's Encrypt Launch Schedule」。

也就是 2015/07/27 會開放,但這個時間點暫時不會有任何 client 支援 (需要手動安裝他們的 root CA),而到了 2015/09/14 後,IdenTrust 會交叉簽名,屆時大多數的 client 都可以認得。

網站發生錯誤例外的監控

GitHub 在 2009 年就開發了一套監控各種 exception 的系統,叫做 Haystack:「Exception Monitoring and Response」。

有些人是用 Airbrake,不過我們家 (KKBOX) 是用 Rollbar,目前是拿來收集各種前端的 javascript error,之後應該會把 PHP 也接上去吧。

以前都要自己刻這些服務,現在也不用自己架,付錢掛上去用就好...

順道一提的是,Rollbar 在台灣有代理商可以處理發票的事情,對於稅務處理上面方便一些。

Linode 提供 KVM-based hosting 服務

Linode 前幾天宣佈開始提供 KVM-based hosting:「Linode turns 12! Here’s some KVM!」。

使用 KVM 最大的進展是可以跑 Windows 了:(這對產品面來說很重要)

However, we also now support fully virtualized guests – which means you can run alternative operating systems like FreeBSD, BSD, Plan 9, or even Windows – using emulated hardware (PIIX IDE and e1000).

同時圖形化界面的 console 也會釋出:

We’re also working on a graphical console (GISH?) which should be out in the next few weeks.

而現有 Xen 換到 KVM 也包裝得很簡單:

On a Xen Linode’s dashboard, you will see an “Upgrade to KVM” link on the right sidebar. It’s a one-click migration to upgrade your Linode to KVM from there. Essentially, our KVM upgrade means you get a much faster Linode just by clicking a button.

而且打算逐步淘汰掉 Xen:

New customers and new Linodes will, by default, still get Xen. Xen will cease being the default in the next few weeks. Eventually we will transition all Xen Linodes over to KVM, however this is likely to take quite a while. Don’t sweat it.

不過 Linode 還是沒支援更好的網路環境 (i.e. Private LAN),對於要架大型服務的人來說還是有技術障礙 :o