這兩天看到 HA 這個縮寫, Google 也沒辦法得到結果, 幸好旁邊有 HA1, HA2 出現, 總算能夠理解它在講什麼. 當然, 還有其他的 HA (Hemagglutinin – 流感病毒血凝素) 也有 HA1, HA2, 但醫學不是我的領域.
我所要找的 HA 是指 High Availability, 根據 [1], HA 有Nodes、Applications、Networks and Network-Adapters以及Disks and Disk-Adapters四種. 主要是在系統發生錯誤的時候, 由額外的軟硬體來接管出錯的網路系統或是硬碟. 因為至少有兩套系統, 才會產生 HA1 和 HA2 的差異.
那麼系統要多穩定才能叫做 high availability 呢? 有網站 [2] 說是 “five 9s" (99.999 percent) . 只能有十萬分之一以下的出錯機會. 但 MySQL 的網站 [3] 說, 5 個 9 雖然已經到軍事級的穩定, 但複雜的架構並不表示更穩定.
如果設計不良, Shared-Nothing, Geo-Replicated Clusters [4] 架構可能還不如 Replicated Systems. 下表的數字應該是指不同穩定等級對應的恢復的時間. 所謂 replicated systems 就是多備份一份, 例如從 server copy 到 client. Copy 完後, client 未必要一直跟 server 保持同步. Clustered 是指沒有 server 和 client 的差異, 幾台設備自動互相同步.
最後一個 Shared-Noting 是指每一個 node 都有獨立的硬碟、記憶體、甚至是網路. “In a shared-nothing system, each component is expected to have its own memory and disk, and the use of shared storage mechanisms such as network shares, network file systems, and SANs is not recommended or supported [5]".
Geo-Replicated [6] 是指在不同地理位置上做備份, 也就是落實雞蛋不要放在同一個籃子. “data is created or updated in a primary location and then asynchronously replicated to a secondary location so that the same data exists (and is backed up) in both locations. Ideally, these locations remain completely independent of each other, with no need to communicate with one another beyond data transfer." [6]
[REF]
1. http://isen-blog.blogspot.tw/2008/04/hahigh-availability.html
2. http://searchdatacenter.techtarget.com/definition/high-availability
3. http://dev.mysql.com/doc/refman/5.7/en/ha-overview.html
4. http://dev.mysql.com/doc/refman/5.7/en/replication.html
5. http://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-overview.html
6. http://searchwindowsserver.techtarget.com/definition/geo-replication