Introduction
Currently Cloud Stack has only one active master DB setup. Going forward it should support multiple Master/Slave cluster setup to enable High Availability of the Database.
...
- MariaDB
- Percona Xtra DB (uses Galera cluster)
- MHA provided by SkySql
- Mysql Cluster
- Mysql Active/Active setup with connector specific configuration to read from slaves in case of master goes down
...
- It is very hard to install this and also need to write our own scripts to switch between master and slave either using VIP concept or some other way of LB
Mysql Cluster
It has the following limitations
- The DB Engine itself changed to NDB Engine instead of InnoDB Engine
- The up gradation from Mysql to Mysql cluster is not gauranteeing that without changes to schema and Sql queries those will work directly
- Foreign Keys are not respected in My Sql Cluster (http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-ndb-innodb-engines.html)
Mysql Active/Active Setup
...
- Added the following properties to db.properties
#High Availability And Cluster Properties
db.ha.enabled=false (change it to true to enable db ha)
db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
...
- We can achieve multiple nodes set up(2 master max and remaining would be slaves) with chain way of replication configuration

another way is circular chaining where all can act as master

- This is tested against mysql version 5.5.x
...