Galera 3.x 的 Replication Relaying

Galera 3.x 為了多機房間的 Replication,設計了 gmcast.segment 這個參數。前陣子 Percona 的人出來介紹了這個參數背後的機制:Automatic replication relaying in Galera 3.x (available with PXC 5.6)。大致摘錄如下:

  1. 同一個機房內資料庫的 gmcast.segment 參數要設為相同。
  2. 機房與機房之間的 Replication 會自動找一個 node 進行 Relay,以降低 Replication 需要的頻寬。

    Image from: Automatic replication relaying in Galera 3.x (available with PXC 5.6)

如果沒有設定 gmcast.segment 參數的話,同樣是三個 Node,會耗用兩倍的頻寬:

Image from: Automatic replication relaying in Galera 3.x (available with PXC 5.6)

原文中另外有對作了 segment 與不作 segment 的 commit latency 進行比較,結果作了 segment 的 commit latency 並沒有比較高。如果有跨機房需求,應該要設定 gmcast.segment。

Leave a Reply

Your email address will not be published. Required fields are marked *