---
title: "MariaDB Enterprise Cluster とは"
publish_date: 2019-11-05
updated_date: 2023-10-12
author: "MariaDB"
tags:
  - name: "Galera Cluster"
    url: "/ja/resources/blog/tag/galera-cluster-ja.md"
  - name: "MariaDB Enterprise Server"
    url: "/ja/resources/blog/tag/mariadb-enterprise-server.md"
---

# MariaDB Enterprise Cluster とは

MariaDB Server における標準的なレプリケーションは binlog(binary log)を用いた非同期(asynchronous)/準同期(semi-synchronous)レプリケーションですが，MariaDB Corporation のパートナーである Codership 社が開発する [Galera Cluster](https://galeracluster.com/) により，Synchronous Multi-Primary Cluster を構築することが可能です。

### [MariaDB Enterprise Cluster](https://staging-mdb.com/docs/usage/mariadb-enterprise-cluster/) とは

MariaDB Enterprise Cluster は MariaDB Enterprise Server 10.4 で利用可能となっている Galera Cluster 4 を元にした Synchronous Multi-Primary Cluster です。MariaDB Enterprise Cluster では GCache(write-set キャッシュ)を暗号化(data-at-rest encryption)することが可能な点が Community Server と異なります。

MariaDB Enterprise Cluster は Multi-Primary Cluster ですので，クラスタ内のいずれかのノードに変更が行われた場合には，その他のノードに直ちにレプリケーションされます。

なお，クラスタ内のインスタンス(ノード)数は [split-brain](https://galeracluster.com/library/documentation/weighted-quorum.html#split-brain-condition) を回避するために奇数である必要があり，最低のインスタンス数は3です。したがって，インスタンス数は 3, 5, 7… となります。

### [MariaDB MaxScale](https://staging-mdb.com/docs/products/mariadb-maxscale/#mariadb-maxscale) による read/write split

MariaDB Enterprise Cluster は Multi-Primary Synchronous Cluster ではありますが，複数のノードの同一テーブルに同時に更新を行うと，競合が発生する場合がありますので，MariaDB の DB Proxy, MaxScale の [read/write split ルータ](https://staging-mdb.com/kb/en/mariadb-maxscale-24-readwritesplit/)を用い，1インスタンスのみに書込(write)を行い，その他のインスタンスに読込(read)クエリをルーティングする構成が一般的となります。

### Streaming Replication

大規模なトランザクション，実行時間の長いトランザクションをクラスタ内でレプリケーションするのは困難な場合があります。MariaDB Enterprise Cluster 10.4 では，[streaming replication](https://staging-mdb.com/docs/usage/mariadb-enterprise-cluster/#streaming-replication)という新機能が追加されており，大規模なトランザクションを分割することで，競合が起きにくくなります。

[Galera Cluster 4: Streaming Replication(英語)](https://galeracluster.com/library/documentation/streaming-replication.html)

### まとめ

MariaDB Platform X3 サブスクリプションをご購入頂いたお客様におきまして利用可能な，MariaDB Enterprise Cluster 概要に関して説明させて頂きました。

英語になりますが，[Enterprise Documentation / MariaDB Enterprise Cluster](https://staging-mdb.com/docs/usage/mariadb-enterprise-cluster/) により詳細に解説されておりますので，こちらもご覧いただけますと幸いです。