文章出處

抽取一部分顯示在這里,如下,

What's the difference in using Cluster
vs using replication?

在復制系統中,一個MySQL主服務器會更新一個或多個從服務器.事務是順序地提交的,因此一個慢事務就可能導致從服務器比主服務器落后一段時間.這也意 味著,如果主服務器出錯失敗了,那么從服務器可能會缺少記錄最后的那一小部分事務日志.如果使用的是事務安全存儲引擎的話,例如InnoDB, 那么事務日志則會完全記錄到從服務器上去或者完全不記錄,但是復制不能保證主和從服務器上的數據總是保持一致性.在MySQL集群中,所有的數據總是保持 同步,在任何數據節點上提交的事務都同步到所有其他的數據節點上了.如果有一個數據節點失敗了,其他正常的數據節點照樣能保持數據的一致性.

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臺計算機.不過我們建議最好是4臺;有2臺分別運行管理節點和SQL節點,另外2臺作為數據節點.采取2臺數據節點的目的是提高數據的冗余度,管理節點放在一個獨立的主機上是為了能夠保證在萬一有一臺數據節點失敗的情況下提供仲裁服務.

A minimum of three computers is required to run a viable
cluster. However, the minimum
recommended 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


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()