Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

best options of failover mariadb with master slave

$
0
0

I was wanting to know if this is possible and the best way to do it. I want to have failover in my mariadb and replication setup where i can have a Master A and a Slave B.

All reads and writes are done to A and some reads are done from B which are more intensive. I need to have it tho so as soon as a write is made on A it could be read from B too.

I would like it also so if A goes down or mariadb is failing then B auto becomes the Master until A comes back online, and when A does come back on it auto updates and then becomes the master again. MariaDB Galera looked great but i need consistant primary keys which wont be possible i learned with that. I also have multiple databases in the mariaDB and am adding more every so often so if they can all auto replicated to every slave when i create them that would be great.

I have php running on my nginx box that connects to the database so i want that to always connect to the correct master automatically, would this be through HAproxy or is there something better? I also need room to be able to scale with ease and add in additional slaves ( maybe over big distances too )

i was looking into using ClusterControl but thought it was free so can't afford that anymore. I am a bit new to the whole multiple databases so any setup guides or best practices on how to do this would be much apprechiated.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>