MariaDB/Percona/Galera – Scaling Techniques and Best Practices

mariadbMySQLperconascalabilityxtradb-cluster

I ventured into the world of NoSQL database and as great as they are the lack of true ACID compliance has been a nightmare resulting in a lot of bad data so I am looking into relational databases.

I am very new into this, but have been looking into MariaDB and Percona clusters with Galera. I see a basic setup is 3 nodes, all which can be read/written to, and all contain identical data in each node.

My question is what happens if I need to scale horizontally:

  • slow write/reads
  • disk i/o issues
  • low memory

QUESTIONS

  • How can I scale to more machines?
  • What is the best practice?

I have not been able to find clear documentation on this.

Best Answer

It's funny you asked this question

I answered a similar question back in June : 9 node percona xtradb cluster

As I stated in my answer, PXC does not write scale.

If you need more read slaves, I would suggest the following

  • Use a 3-node PXC (and no more)
  • Give each PXC enough disk and RAM
  • Use 10Gig E among all PXC nodes (if you are going bare metal)
  • Use a VIP or CNAME to confine all writes to one PXC
  • Set up standard MySQL Replication from each PXC node
  • Load balance reads based on slaves with least replication lag (preferably none)