Pergunta

I have final project for my course about distributed system, so here the case :

A company need 3 database server ( example : database a,b,c ) who works together. So if someone insert a data to database a , the other database ( b and c ) will have that data too. But when network disconnected, the database server will work like standalone server. But when network connected again, all data that inserted during network disconnected, will distributed to other database. Example : The database a disconnected to other database, and someone insert a data to database a. And after database a connected to other database, other database will have that data again.

I try with galera, but it will fail to insert data when network disconnected.

Foi útil?

Solução

Galera has the principle that a "quorum" in needed to declare that the cluster is alive.

For example if 'a' disconnects from 'b' and 'c', but 'b' and 'c' are still talking to each other, then

  • b and c have a quorum (more than half the servers), so they declare they are the cluster.
  • 'a' does not have a quorum, so it refuses to accept any writes.
  • If the network gets repaired, 'a' will ask b & c for the latest updates and get back in sync.

That is Galera. If you have plain MySQL multi-master, you have a nightmare when the network breaks.

NDB Cluster works a different way -- every node can be disconnected. However, you must provide rules for "eventual consistency" of the data.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top