Monday, April 10, 2017

MS Failover Cluster 常見設計錯誤


接續上篇 再來就是一般常看到
大家在安裝 MS Failover Cluster 以及安裝於上面的AP 常發生的錯誤

以下列為例


Cluster 也會有一個 Manage Point
Cluster Admin可以透過 Manage Point 管理整個Cluster
Cluster Manage Point 同時間也只會在一個 Server Node 上面

左圖為例 Cluster Manage Point 與 Service Access Point 同時 Active 在 Server Node 1










Cluster Admin 透過 Cluster Manage Point 來管理整座 Cluster
Service User 透過 Service Access Point 來取用服務



但是 假設下列狀況

Service User 不知怎麼得知 改由 Cluster Manage Point access Service.

此時狀況下 Service User 一樣可以取得 Service 的回應 因為 Cluster Manage Point 與 Service Access Point 都在 Service Node 1














但是假設有天 Cluster Manage Point 飄走了 跑到了 Server Node 2.
而 Service 還是停留在 Node 1.



這時候狀況下 Service 還是活著喔
但是 User 卻無論如何都無法取用到 Service
因為 Cluster Manage Point 已經在 Node 2.
而且此時 Node 2 Service 是 Standby 狀況 自然就沒回應
















另外還有一種狀況如下

一個 Cluster 上面同時有兩種 Service
Service 1, Service 2 各自有各自的 AP
(Cluster Manage Point 省略不畫)

一般來說鍋話
Service 1 AP 會用到 Storage 1
Service 2 AP 會用到 Storage 2
各自分開










可是有哪位大哥 在安裝 Service 2 AP 的時候 把資料放在 Storage 1 上面了
當下當然不會有問題 可是哪天呢


Service 2 流浪到另一個Server Node
那就.... Service 2 無法抓到 Storage 1
因為 Storage 1 屬於 Service 1, 目前 Active 在 Node 1.

而 Service 2 正在 Node 2
想抓也抓不到
此時 Service 2 就掛掉了









另外還有一個常見到的設定錯誤 或者一般人比較不會去注意的地方
一般來說各種 Cluster Resource 之間或有相依性
如下圖 Service 1 必須要配置在 Access Point 以及 Storage 上面
有些比較複雜的系統 可能會有多個 Service, 期間也可能有相依性
像下圖 Service 2 就必須要在 Service 1 起來之後 才能夠跑起來
但是大部份時候 這些相依性必須由 Cluster Admin 自行設定
而 Cluster Admin 一般又是由 AP/Service Admin 兼任
這時要是 Service Admin 沒有顧慮到 要設定相依性的話
往往有時候 Cluster Resource 啟動順序沒有照自己所規劃
例如上圖範例 Service 2 比 Service 1 還早啟動
或是 Service 1, 2 沒有等 Storage 啟動完成 就急著啟動
此時就是... 掛掉拉
所以設定 Cluster Resource 相依性 可以強迫限制 Resource 的啟動順序
避免順序錯亂的問題發生



上述幾種狀況 大概是這幾年下來 看過 發生過的案例
這些錯誤的設計 或是設定 往往當下不會發生問題 也不會被發現有問題
大概也是因為大部分系統上線之後 大家都不敢去動 也不敢先做 Drill Failover 測試
往往等到許久 幾個月 甚至三年五年後 真正要 Failover 發生的時候才發現有問題
此時有可能會有幾種結局

知道怎麼改設定的 例如相依性 改改就好
Service Access Point 指錯地方的 去翻翻 AP connection string 看有沒有機會修正回來
Service 檔案裝錯地方的 這大概就要人命了 這時候大家大概不想 也不敢去動它了
正是所謂 假 HA...

下篇原本想講 MS Cluster HA 投票機制
不過...先換換別的口味好了

No comments:

Post a Comment