MySqlクラスタFAQ------mysql主従配置とクラスタの違い、クラスタには何台のコンピュータが必要ですか?どうして?など

2700 ワード

抽出の一部はここに表示され、以下のように、
What's the difference in using Clustervs using replication?
レプリケーションシステムでは、1つのMySQLプライマリサーバが1つ以上のセカンダリサーバを更新します.トランザクションは順次コミットされるため、遅いトランザクションは、プライマリ・サーバよりもサーバがしばらく遅れる可能性がある.これは、プライマリ・サーバのエラーが失敗すると、サーバから最後のトランザクション・ログの一部が記録されない可能性があることを意味する.トランザクションセキュリティストレージエンジンを使用する場合、例えばInnoDBでは、トランザクションログはサーバから完全に記録されるか、まったく記録されないが、レプリケーションはプライマリとセカンダリのデータが常に一貫性を保つことを保証できない.MySQLクラスタでは、すべてのデータは常に同期され、任意のデータノードでコミットされたトランザクションは他のすべてのデータノードに同期されます.1つのデータノードが失敗する場合、他の正常なデータノードはデータの一貫性を維持することができる.
In a replication setup, a master MySQL server updates one or more slaves. Transactions are committed sequentially, and a slow transaction can cause the slave to lag behind the master. This means that if the master fails, it is possible that the slave might not have recorded the last few transactions. If a transaction-safe engine such as InnoDB is being used, a transaction will either be complete on the slave or not applied at all, but replication does not guarantee that all data on the master and the slave will be consistent at all times. In MySQL Cluster, all data nodes are kept in synchrony, and a transaction committed by any one data node is committed for all data nodes. In the event of a data node failure, all remaining data nodes remain in a consistent state.
In short, whereas standard MySQL replication is asynchronous, MySQL Cluster is synchronous.
We have implemented (asynchronous) replication for Cluster in MySQL 5.1. This includes the capability to replicate both between two clusters, and from a MySQL cluster to a non-Cluster MySQL server. However, we do not plan to backport this functionality to MySQL 5.0.
How many computers do I need to run a cluster, and why?
クラスタには少なくとも3台のコンピュータが必要である.しかし、私たちは 台が一番いいです.管理ノードとSQLノードをそれぞれ2台、データノードとして2台実行する.2台のデータノードを採用する目的はデータの冗長性を高めることであり、管理ノードを1つの独立したホストに置くことは、万一1台のデータノードが失敗した場合に仲裁サービスを提供することを保証するためである.
A minimum of three computers is required to run a viable cluster. However, the minimumrecommended number of computers in a MySQL Cluster is four: one each to run the management and SQL nodes, and two computers to serve as data nodes. The purpose of the two data nodes is to provide redundancy; the management node must run on a separate machine to guarantee continued arbitration services in the event that one of the data nodes fails.
To provide increased throughput and high availability, you should use multiple SQL nodes (MySQL Servers connected to the cluster). It is also possible (although not strictly necessary) to run multiple management servers.
参考:A.10.MySQL 5.0 FAQ-クラスタ
A.10 MySQL 5.6 FAQ: MySQL Cluster