SQLite 官方自己搞的 Cloud Backed SQLite

SQLite 自己搞了一套使用雲端空間為儲存空間的技術:「Cloud Backed SQLite」,對應的 Hacker News 討論可以看「Cloud Backed SQLite (sqlite.org)」這邊。

他說目前支援 Azure Blob StorageGoogle Cloud Storage,這點比較有趣,沒有提到 Amazon S3

The system currently supports Azure Blob Storage and Google Cloud Storage. It also features an API that may be used to implement support to other cloud storage systems.

跟之前的 sql.js 專案不太一樣,sql.js 的作法是用 HTTP range 存取現有的 SQLite 資料庫檔案,而這次的這個專案則是改變底層架構,去配合雲端環境的特點。

雲端的 storage 因為每個 access 都會有很高的 latency (相比於本地的空間),所以要避免太多 random access,儘量以 sequential access 為主,這個特性像是以前在處理傳統磁頭硬碟時的技巧。

另外一個特點是雲端空間有多檔案的概念,所以也可以利用這個方式設計資料結構。

還蠻有趣的計畫,而且是官方搞的...

AWS DataSync 支援 GCP 與 Azure 上的 Storage 上的資料了

AWS DataSync 宣佈支援 GCP 與 Azure 上的 Storage 了:「New for AWS DataSync – Move Data Between AWS and Other Public Locations」,比較特別的是,文章的 URL 有提到這兩家的產品,但在標題上反而就沒提到...

這測的重點就是支援 Google CloudMicrosoft Azure 的 object storage 產品:

Today, we added to DataSync the capability to migrate data between AWS Storage services and either Google Cloud Storage or Microsoft Azure Files.

之前大家都是自己開機器手動搬,現在可以直接付錢 (依照 GB 計費) 用服務搬了,不過要注意網路頻寬的流出部份還是有費用...

用 Ephemeral Storage 加速 MySQL over ZFS 的效能

Percona 的「MySQL/ZFS in the Cloud, Leveraging Ephemeral Storage」這篇裡面在探討是不是可以看看 ZFS 在 Ephemeral Storage (機器附的本地硬碟) 上的效能。

一開始測試是直接當主力硬碟來測,可以看到跑 ZFS 的情況下,本地的 storage 還是會比 SSD Premium (這是 Azure 的產品線) 還快不少:

但把資料放在本地的 storage 上其實有點刺激,至少在 production 應該不太會這樣搞,所以後面用 L2ARC 的方式來測,可以看到效率提昇相當明顯,甚至接近本來直接把資料放在本地的 storage:

另外測了 ext4/bcache,看起來效率就沒那麼好:

這樣看起來是個不錯的選擇...

疾管署的 COVID-19 每日送檢數的 Open Data

記者會上有提到現在疾管署的網站上有公開每日送檢數的資料,花了些時間找,在「台灣COVID-19冠狀病毒檢測每日送驗數」這邊可以看到,網站提供的 preview 的界面沒辦法看到最新的資料,但下載後可以看到檔案格式是 UTF-8 的 CSV 檔,應該還算能處理...

找到這個資料花了一些功夫 (因為用 DuckDuckGoGoogle 都沒直接找到),後來是靠這樣的步驟找到的:

本來點選熱門資料那邊的「COVID-19台灣最新病例、檢驗統計」結果發現只有一筆資料,而且看起來最後更新時間是 2020/04/24,所以得往其他地方翻。

首先點了上面的「最新消息」發現是個系統公告區,不是我要的,接下來才又找到正確的路線...

這時候就會看到最前面提到的「台灣COVID-19冠狀病毒檢測每日送驗數」了。

然後 data.cdc.gov.tw 這個網站看起來是放在 Microsoft Azure 的日本區?

花最多錢的 API call

昨天看到這個有趣的討論,要怎麼樣在一個 API call 裡面花最多錢:「How to burn the most money with a single click in Azure」。

主要是這篇開始,在 AWS 上面買 RDS 的 RI,這一個 API call 可以花三百多萬美金:

然後作者試著在 Azure 上找到 Cosmos DB 可以花到九百多萬美金:

另外一個是用 Blob Storage 撐量出來,一億六千多萬美金:

然後最終極的方法是 999 台 instance 的 RI,可以到八億 XDDD:

不過後面這些方法應該買不下去,雲端服務預留的 capacity 應該不夠這樣搞...

各家 Serverless 服務冷啟動 (Cold Start) 的時間

看到「Serverless: Cold Start War」這篇分析了 AWS LambdaAzure FunctionsGoogle Cloud Functions 的冷啟動特性。

裡面分析了多久沒有 request 會需要冷啟動、記憶體的大小對於冷啟動速度的影響、程式語言的影響,以及程式大小的影響。

對於量很少,但是又很在意速度的人來說也許可以研究一下。不過只要有點量 (就算一分鐘只有一次) 應該都不會遇到這塊問題...

Microsoft 啟用自己的 CDN 了...

在朋友的 tweet 裡看到微軟啟用自己的 Azure CDN 了,先前應該是提供 AkamaiEdgeCast 的服務:「Announcing Microsoft's own Content Delivery Network」。

看圖似乎是有台灣的點,不過我找不到可以測試 traceroute 的 endpoint,頁面上用的圖還是 EdgeCast 的啊 XDDD

;; ANSWER SECTION:
azurecomcdn.azureedge.net. 1604 IN      CNAME   azurecomcdn.ec.azureedge.net.
azurecomcdn.ec.azureedge.net. 3404 IN   CNAME   cs9.wpc.v0cdn.net.
cs9.wpc.v0cdn.net.      3404    IN      A       117.18.232.200

然後公測期間優惠價 50%:

Azure Content Delivery Network Standard from Verizon (S1) and Akamai (S2) and Microsoft (S3)*
*S3 is currently in public preview. CDN rates will be 50% of the stated price during this period.

Rasmus Lerdorf 關於 VPS 的介紹測試...

Rasmus LerdorfPHP 的發明人,純粹是有趣的角度看這篇文章:「Testing VPS solutions」。

文章裡比較了十家 VPS 或是可以當作 VPS 的雲服務商,先直接講重點,看起來他最後選了 Vultr

A serious competitor to Digital Ocean. I would use this.

不過 Vultr 有個讓人不太舒服的地方 (對我而言) 是登入機制沒有 2FA,所以只能透過 Password Manager 用強密碼保護。不過除此之外都還算不錯。

不過既然是 Rasmus,在提到 MicrosoftAzure 才會是重點 XDDD:

This one was painful. Yes, I have a bit of a Microsoft aversion, but I tried to keep an open mind. Read the full description of my Azure adventure. Expensive, apparently no IPv6, slow disk IO, and I couldn't figure out block storage options. Definitely not for me.

然後在測試 Azure 時的評語就更酸了:

Oh Azure! This one is going to get a bit ranty. I Spent a good 20 minutes clicking around the provisioning Web UI. To be fair, it is more geared to people needing to provision a lot of servers. Doing a single one like this is not the target audience as far as I can tell. But still, instead of presenting a couple of standard options and a way to build your own custom config, Azure gives you 92 options (depending on which region you select):

繼續抱怨找不到價錢:

I also got super lost trying to figure out what it would cost to bring the VPS up to 500 GB of persistent storage. And then to make things even more confusing, when I started the virtual machine creation process and came to the "Choose your virtual machine size" step, I got a bunch of different options not included in the above list with most of them listed as "Not Available" including both the A4 v2 and F4 options I had so carefully located.

然後還有奇怪的 agent 在跑:

The Azure VPS also had the heaviest provisioning agent of all the ones I tested. It looks like it is doing a heartbeat once per second and doing a (non-ssl) GET request to an IIS server upstream asking it for a "GoalState". I listened and checked what the IIS server responded with. The response from the management server is in the GoalState addendum below. It is mostly self-explanatory, I think.

相較於其他家 VPS 的評測,這部份的長度與酸度都頗不賴的 XDDD

Microsoft 虛擬化的兩個消息:Azure 被打臉以及 AWS 推出轉移工具

首先是 VMware 發文打臉 Microsoft 說他們所宣稱的轉移工具 (從 VMware 轉到 Azure 上) 並沒有 VMware 原廠支援:「VMware – The Platform of Choice in the Cloud」。

然後 AWS 則是推出了從 Hyper-V 轉移到 AWS 的工具:「Migrate Hyper-V VMs to AWS with AWS Server Migration Service」,這邊倒是沒提到官方支援...

這臉不只是腫腫的而已了,有種連續技的感覺 XD

Microsoft Azure 宣佈正式支援 FreeBSD

Microsoft Azure 宣佈支援 FreeBSD:「Microsoft has created its own FreeBSD image. Repeat. Microsoft has created its own FreeBSD image」,Microsoft 的正式公告在這:「FreeBSD now available in Azure Marketplace」。

Microsoft 所作的 patch 都有進 10.3-RELEASE 裡,主要是對於 Hyper-V 虛擬化後的效能補強:

The majority of the investments we make at the kernel level to enable network and storage performance were up-streamed into the FreeBSD 10.3 release, so anyone who downloads a FreeBSD 10.3 image from the FreeBSD Foundation will get those investments from Microsoft built in to the OS.

像是 10Gbps 網路這部份就有明顯的改善:

For example, our measured networking throughput on a 10Gb network on FreeBSD 10.1 was 2Gbps. With 10.3, we’ve been able to achieve over 9Gbps in testing

不過我覺得宣傳意義比實質意義重一些...