海盜灣進駐北韓...

Update:請參考 comment 裡 scw 貼的連結,這是用 BGP 惡搞出來的假象。

在看到海盜灣最新的公告文章「PRESS RELEASE, NEW PROVIDER FOR TPB」這篇,其中這段:

Today we can reveal that we have been invited by the leader of the republic of Korea, to fight our battles from their network.

唔啊... 這哪招啊... @_@

現在查 thepiratebay.se175.45.177.217

;; ANSWER SECTION:
thepiratebay.se.        52276   IN      A       194.71.107.15

這個 IP 註冊在平壤的柳京洞 (Ryugyong-dong):

inetnum:        175.45.176.0 - 175.45.179.255
netname:        STAR-KP
descr:          Ryugyong-dong
descr:          Potong-gang District
country:        KP
admin-c:        SJVC1-AP
tech-c:         SJVC1-AP
status:         ALLOCATED PORTABLE
mnt-by:         APNIC-HM
mnt-lower:      MAINT-STAR-KP
mnt-routes:     MAINT-STAR-KP
remarks:        -+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
remarks:        This object can only be updated by APNIC hostmasters.
remarks:        To update this object, please contact APNIC
remarks:        hostmasters and include your organisation's account
remarks:        name in the subject line.
remarks:        -+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
changed:        hm-changed@apnic.net 20091221
source:         APNIC

來真的啊~

AWS SES 總算可以「手動」把 Blacklist 拿掉...

AWS SESAWS 服務裡面設計問題超多的一個服務,在推出兩年後 (2011 年一月) 總算是提供把 Blacklist 拿掉的功能...

原始的設計是,只要對方位置不存在,這個 e-mail 就會進黑名單 14 天,無法刪除。而一次寄給多人的信件,只要有一個人是黑名單就會全部擋掉 XDDD

再來是這個 14 天限制,並不是「第一次被擋掉後 14 天」,而是「最後一次失敗後 14 天」,而「最後一次失敗」包括 retry... =_=

弄到最後反而是自己架 mail server 比較快,針對問題很多的 @yahoo.com 系列與 @*.hinet.net 透過 AWS SES 寄就好...

Xiph 講數位訊號...

Xiph 是個網路多媒體相關的 open source 組織,前陣子放了教學影片,介紹多媒體的理論:「Xiph.org: Video」,目前每一集都大約半小時,可以下載下來或是直接在網站上看。

第一課「Episode 1: A Digital Media Primer for Geeks」從數位訊號開始講,包括影像與聲音。第二課「Episode 2: Digital Show & Tell」則是介紹聲音的部份 (包括數位與類比)。

有興趣可以去看看 :p

Linode 推出免費試用方案...

Linode 一直是 Hacker News 的寵兒,其中有幾項與其他的 VPS 比起來相當突出:

  • 相當直覺而且簡單易懂的管理界面,另外還有 DNS 代管服務。
  • 超值的 CPU 用量,比起 AWS EC2 或是其他 VPS 的限制都寬不少。

另外價錢合理以及全球各地區都有機房也是很重要的特色。

不過國外有人寫了一篇關於 DigitalOcean 與 Linode 的比較文章後,Linode 就被打入冷宮了 XDDD

雖然 DigitalOcean 只有兩個點 (一個在美東,另外一個在歐洲),而且管理界面還有點陽春,但提供的品質與價錢遠遠超越 Linode... (請參考「DigitalOcean 與 Linode 的比較...」以及「測試 DigitalOcean 荷蘭阿姆斯特丹的機器...」這兩篇文章)

過了兩個禮拜後 Linode 總算反擊了:「Create a free account and Trial Linodes」,不過力道看起來很差啊,依照原文的說明是讓你試用 Linode 512 這個規格的機器幾個小時... XD

Once confirmed you will be taken to a welcome page (the Account tab), where you will be given the option to spin up a Linode 512 cloud server to play around with for a couple of hours.

對於台灣的使用者來說,Linode 有東京機房的服務還是相當有用的,有興趣的人可以跳進去測試看看 :p

Google 發表與 zlib/deflate 相容的壓縮程式,再小 5%...

GoogleApache License, Version 2.0 發表了與 zlib/deflate 相容的壓縮程式:「Compress Data More Densely with Zopfli」。

與 zlib/deflate 相容代表現有的 browser 都不需要變動,而在 project 頁面上是這樣寫:

Zopfli Compression Algorithm is a new zlib (gzip, deflate) compatible compressor. This compressor takes more time (~100x slower), but compresses around 5% better than zlib and better than any other zlib-compatible compressor we have found.

比起現有的 zlib-compatible compressor 大約慢 100 倍 (XDDD),但對於靜態內容的幫助會很大,因為壓一次後就可以用很多次。

HiNet 讓 YouTube 變快的方法:擋掉 210.71.222.0/24

在「How to stop TWC ISPs sucking at Youtube」這篇看到作者 (在美國) 抱怨時代華納 (Time Warner Cable,TWC) 連 YouTube 看影片的速度很慢,然後發現擋掉某個網段就快很多了...

看了 Hacker News 上的討論以及以前得知的架構,這些 IP 有可能是:

  • YouTube 自己的 CDN 伺服器,以 appliance 的形式放到 TWC 內。
  • TWC 買 YouTube cache solution 丟自己機房。

如果要猜的話,我會猜前者...

然後同樣問題也在 HiNet 發生,實際測試後就找到 210.71.222.x 這個網段。

Linux 下是使用 iptables 擋,其他作業系統可以在原文裡找到說明:(我自己的 Linux 是放到 /etc/rc.local 裡)

/sbin/iptables -A OUTPUT -d 210.71.222.0/24 -j REJECT

補充 Windows 的方法:

在「開始」選「執行」,輸入 cmd,然後跳出黑色視窗後輸入:

netsh advfirewall firewall add rule name="BLOCKSLOWYOUTUBE" dir=in action=block remoteip=210.71.222.0/24 enable=yes

設定完後可以回到瀏覽器找影片測試 YouTube 的速度。

擋掉後會把流量導到國外 (測了幾個都是美國的機房),而連到國外機房可以跑到 8Mbps (速度會飄動,不過都超過 4Mbps),反而比國內 HiNet 機房內的速度快太多...

看起來是 YouTube 的 flash player 會先偵測位於 ISP 的伺服器,有問題時會使用備用方案 (在這邊是美國機房),只是使用備用方案比 ISP 的伺服器快多了。

新版的 Google Chrome 將會在 Tab 上 Icon 標示發出聲音...

開了一堆頁面,卻找不到放音樂的 tab 是哪個?在新版的 Google Chrome 裡會將正在放音樂的 tab 用動畫標示在 tab 上的 icon:「Chrome Shows Which Tab Is Making a Noise」,像是這樣的提示:

目前在 Canary channel 裡才有,等個幾個月就會在正式版本出現了... (canary -> dev -> beta -> stable)

換 NoSQL 前的建議...

原文是「Medium Data: things to try before abandoning SQL」,放棄 SQL 前應該要嘗試的事情,原文一開始就用粗體說明帶有強烈的偏見 XD

First, my thesis: a lot of less-experienced developers are using big data and NoSQL technologies because they are new and cool, and because SQL is old and hard. A lot of these people would save themselves time and effort by learning more about SQL and tuning their databases and hardware just a little bit.

文章寫的相當概念性,主要是說明幾件事情:

  • 其實 SQL 可以解決大部分的事情,大家都知道 SQL 的瓶頸在哪裡,有哪些 workaround 可以避開。
  • 不要因為 MySQL 做不到就覺得 SQL 不好用,在這種情況下,PostgreSQL 的功能與成熟度很值得看看。
  • 不要用 Oracle 官方版本的 MySQL... XD
  • 通常可以用 cache 解決的就用 cache 試著解看看,雖然 invalidate 問題不太好處哩... XD
  • 如果是 Read 數量太多,可以用 replication 解決不少問題。
  • 試著去理解 index 的「原理」,也就是資料結構,這對於要怎麼用 index 絕對有強力的幫助。
  • 當上面都做完而發現還是不夠的時候就 sharding 吧。

網路陸陸續續恢復了...

據說是改接線路跳過 UPS 後直接上市電供應,然後逐層恢復:(出自公開社團「225 內湖機房斷線八卦區」)

然後中華也恢復對 ajax.googleapis.com 該有的 packet loss 了:(參考上篇「HiNet 到 Google 改走國際線路,packet loss rate 反而降下來...」)

現在連的到 www.chief.com.tw 了,也看得到官方公告「是方電訊IDC大樓復電 客戶服務陸續恢復正常」了...