[MXS-734] Force Slave Status for nodes in Multi Master Setup Created: 2016-05-20  Updated: 2017-12-01  Resolved: 2017-03-20

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 1.4.3
Fix Version/s: N/A

Type: New Feature Priority: Minor
Reporter: Emerson Gomes Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Environment:

Linux - Centos 7 64bit



 Description   

I would like to request the implementation in the mmmon module of the hability to "force" the status of a given node to be a Slave. (No writes are routed torwards this node).

Today this is accomplished by setting up the global read only flag in the node, but in some situations this is not desirable. (Node A should receive writes from app in node A plus reads from app in Node B and vice-versa)

This could be implemented as a flag in the [server] section.



 Comments   
Comment by Michaël de groot [ 2016-08-26 ]

I don't think it is MaxScale's task to do this - perhaps a better place is in your monitoring solution?

Comment by Emerson Gomes [ 2016-08-26 ]

I think my description is not very clear.

I have an environment with 2 Multi Master Nodes, however, I wish the application to send writes commands (inserts, updates, deletes) to Node A only, but send read commands to both Node A and B (selects).
However, I want B to be able to take over write capabilities in case A fails and also receive writes from other components (AppB for instance).
This is why I cannot set global read only to B.
Without these constraints, the global read only approach would work fine in today's implementation.

It has nothing to do with monitoring I believe.

Comment by Michaël de groot [ 2016-08-29 ]

Ah, I see. The concept of 'mmmon' is that the node who does not have read_only enabled is the master. That monitor is not suitable for your need.

You could do this with weighting, however I found a bug with that: MXS-842 - I am not sure if that's a mmmon bug or a readconnroute bug. If you setup a router with db1 weight 1000 and db2 weight 0 you would have that same effect.

Also you could not run a monitor in MaxScale it would not change or touch the 'slave' and 'master' states. Using the 'maxadmin' command you could set and clear these statuses yourself:
maxadmin -pmariadb set server db1 slave
maxadmin -pmariadb set server db1 slave

By the way, forcing a master to be a slave thus no longer receiving write traffic is not how MaxScale works. A node receives writes because it has the master state (instead of receiving writes because it does not have the slave state). You can set the master set as well using maxadmin.

Good luck!

Comment by Johan Wikman [ 2017-03-20 ]

Mmmon is not really being worked on anymore.

Generated at Thu Feb 08 04:01:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.