Galera is the best solution for High Availability, It is being used by many peoples world wide . Galera is doing synchronous replication ( really it is Certification based replication ) to keep update the data on group nodes . In this blog I have explained about “How the Galera replication works?” . For the better understanding, I have made an architecture diagram to describe the replication flow . I have also provided the explanation for the key words which has used in the architecture diagram .
Architecture flow Diagram :
What is writeset ?
Writeset contains all changes made to the database by the transaction and append_key of the changed rows .
What is append_key ?
Append_key registers the key of the changed data by the transaction. The key for rows can be represented in three parts as DATABASE NAME, TABLE NAME, PRIMARY KEY .
If the table don’t have the PRIMARY KEY, the HASH of the modified data will be the part of the writeset .
What is Certification in Galera ?
Certification in Galera will be performed to detect the conflicts and the data consistency among the group . It will be performed before the transaction comiit .
What is CVV ( Central Certification Vector ) ?
CVV is used to detect the conflcits . The modified keys will added in to the Central Certification Vector. If the added key is already part of the vector, then conflict resolution checks are triggered.
Hope this blog will helps someone, who is working with Galera Cluster . I will be come up with my next blog soon .