galera cluster across multiple dc's

Comments

4 comments

  • Avatar
    Ashraf Sharif

    Hi,

    Total nodes (across sites) need to be an odd number. Let's say if you have A,B,C as the sites. If you have 2 sites, A holds primary status where garbd is located and B holds the secondary. Both sites are master and sync up until site A goes down. If site A is down, site B won't work unless you rebootstrap the cluster on B. 

    If you have 3 sites, place the garbd in C so A and B are master and hold the primary status. If any of A or B goes down, either site can still serve as a master since site C is there as the arbitrator. 

    Take a look at this blog post for more examples:

    http://severalnines.com/blog/architecting-failure-disaster-recovery-mysqlmariadb-galera-cluster

    Regards,

    Ashraf

  • Avatar
    john test

    Thanks Ashraf.

    So is it preferable to have garbd node in 3rd site or is it fine if we have it in site A or B in case of 2-site solution?

  • Avatar
    Ashraf Sharif

    For more resilient solution, garbd on third site is preferable but it could cost you more. If you have very good connectivity between both sites, 2-site solution would be enough though. It's your call really. Either one has its own advantages.

     

    Regards,

    Ashraf

  • Avatar
    john test

    Thank you.

    In fact, the connectivity is not very good between the 2 sites. This is the reason we were initially considering 2 separate galera clusters with mysql multi-master replication between them. but we ran into other issues with this glue approach so we chose just deploy one galera cluster across the 2 sites.

    What would you recommend as the best solution?

     

    Thank you for your help!

Please sign in to leave a comment.

Powered by Zendesk