1

I have already setup properly 3 node (mariadb) Galera cluster with maxscale load balancing. maxscale is on different server. All the nodes are Primary component. I want to test the non-primary component situation. How can I create this situation in my Galera cluster.

I stopped one by one all the servers and started again one by one but all the nodes are in sync when they are started back.

How can I test the non-primary state of a node.

Anup_Tripathi
  • 2,817
  • 3
  • 26
  • 37

1 Answers1

0

Add a 4th node and make it a Replica only, not a Primary. And don't tell maxscale to allow writes to it.

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • I just want to break the current setup in Primary and Non Primary components to just test. I mean I want to know when (at what incident) can one node go in Non-primary state. like network disconnection of a node with cluster etc... How to generate this condition. – Anup_Tripathi Aug 10 '20 at 04:02
  • When, I stop mysqld and restart it in sometime. It becomes primary component and starts taking write and update queries. That means it does not become non-primary as a node is a non-primary component when it is live & still rejects queries. – Anup_Tripathi Aug 10 '20 at 11:07
  • @Anup_Tripathi - Perhaps something needs changing in MaxScale at the same time? – Rick James Aug 10 '20 at 22:26