Amazon Aurora (MySQL) 推出的 Asynchronous Key Prefetch

Amazon Aurora (MySQL) 推出新的效能改善,可以改善 JOIN 時的效能:「Amazon Aurora (MySQL) Speeds Join Queries by More than 10x with Asynchronous Key Prefetch」。

看起來像是某個情況的 optimization,將可能的 random access 換成 sequential access 而得到大量的效能:

This feature applies to queries that require use of the Batched Key Access (BKA) join algorithm and Multi-Range Read (MRR) optimization, and improves performance when the underlying data set is not in the main memory buffer pool or query cache.

其實記憶體還是最好用的加速器,能加大硬拼就先硬拼... XD

Preload、Prefetch 與 Preconnect 的差異

KeyCDN 的「Resource Hints – What is Preload, Prefetch, and Preconnect?」這篇文章介紹了 Preload、Prefetch 與 Preconnect 這三者的差異。

Preconnect 從字面上看就很好理解,而 Preload 與 Prefetch 最大的差異:

Preload is different from prefetch in that it focuses on current navigation and fetches resources with high-priority.

主要在 priority 的差異。

DNS Prefetch 的利弊

Simon Willison 轉了一篇文章,提到某個網站用 meta tag 關掉 DNS Prefetch 後,每個月省下 USD$1600:「DNS Prefetching Implications」。

會這麼貴的主要原因在於 DNS Prefetch 是利用「浪費資源」加速,設計上本來就不需要很快的反應時間,所以不應該讓他上昂貴的 Anycast-based DNS service。更何況 Anycast-based DNS service 應該是在整個系統都 tune 到極致後,壓榨最後一丁點效能的武器...

自己架設 DNS server,或是透過 Domain Registar and/or Hosting 公司代管,效果其實都不差。如果想要測試 Anycast-based DNS service,除了 Route53 可以玩看看以外,EasyDNS 也有提供平價的服務 (而且可以是 slave server),要測試的人可以測看看...