Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous vs. Asynchronous Replication #654

Open
sabahsawor opened this issue Feb 6, 2024 · 3 comments
Open

Synchronous vs. Asynchronous Replication #654

sabahsawor opened this issue Feb 6, 2024 · 3 comments

Comments

@sabahsawor
Copy link

sabahsawor commented Feb 6, 2024

This is not an issue question, but I'm not sure where I have to post this question.

I want to deploy both Synchronous vs. Asynchronous on the same time, basically I need to setup a 3 of mysql nodes as a cluster on AWS (Synchronous replication) and one node in our on premise server with Asynchronous replication.

I'm not sure if Galera have this capability

@ayurchen
Copy link
Member

ayurchen commented Feb 6, 2024

Hi, Galera itself does not have this capability, but you can use any Galera cluster node as a primary for native MySQL asynchronous replication.

To be able to seamlessly switch master nodes make sure to set

log_replica_updates=1
wsrep_sync_server_uuid=1

@sabahsawor
Copy link
Author

Hi, Galera itself does not have this capability, but you can use any Galera cluster node as a primary for native MySQL asynchronous replication.

To be able to seamlessly switch master nodes make sure to set

log_replica_updates=1
wsrep_sync_server_uuid=1

Thank you Alexey for your answer,

So your idea is to add 4 nodes (3 in AWS cloud servers and one in premise server) to Galera cluster and set the one in premise with the setting you provided?

@6eh01der
Copy link

@sabahsawor , hello. You should you use this parameters at all galera nodes.

log_replica_updates is required for binlog that required for classic async MySQL replication.

wsrep_sync_server_uuid - about this option you could read here https://galeracluster.com/library/documentation/mysql-wsrep-options.html

Node that will receive async replication will not be galera cluster node, it'll be just standalone MySQL that will receive data by classic replication mechanism.

Some links:

https://severalnines.com/blog/how-setup-asynchronous-replication-between-mariadb-galera-clusters/

Another variant is that your on prem node will be part of the cluster but with another segment - https://severalnines.com/blog/deploying-hybrid-infrastructure-environment-percona-xtradb-cluster/

https://galeracluster.com/library/documentation/galera-parameters.html#gmcast-segment

Replication will work by the same galera mechanism (wsrep) but with some location optimisations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants