[MXS-1743] Maxscale unable to enforce round-robin between read service for Slave Created: 2018-03-27 Updated: 2020-08-25 Resolved: 2018-06-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readconnroute |
| Affects Version/s: | 2.2, 2.2.3 |
| Fix Version/s: | 2.2.9 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Pramod Mahto | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS , MaxScale |
||
| Attachments: |
|
| Description |
|
With the router_options set to slave,master , accessing node gives an error below "MySQL server has gone away" [Master & Slave node are up and running].
If Slave-node is stop (Service mysql stop) then all read queries are directing to the master-node.
When we remove the slave option from the router_options i.e router_options=master then it only goes to the Master (Which is as expected )
When we remove the master option from the router_options i.e router_options=slave then it only goes to the Slave (Which is as expected )
Is there a way that will enforce a round-robin between Master-node and Slave-Node?
|
| Comments |
| Comment by markus makela [ 2018-04-04 ] | ||||||||||||||||||
|
router_options=master,slave now works correctly. | ||||||||||||||||||
| Comment by Pramod Mahto [ 2018-06-04 ] | ||||||||||||||||||
|
With router_options=master,slave , still its not working as expected . Tested with Maxscale 2.2.5 and 2.2.6
Then it should enforce round-robin between Master and Slave node i.e. servers=master-node,slave-node-01,slave-node-02 which is not working as expected , all connection goes to only master-node
then it enforce the round-robin between only Slave server i.e between slave-node-01,slave-node-02. | ||||||||||||||||||
| Comment by markus makela [ 2018-06-04 ] | ||||||||||||||||||
|
The load balancing algorithm mistook the master server as the only valid candidate when router_options=master,slave was defined. The correct way to do it is to check if router_options=master is explicitly specified (in other words, no other types of servers are allowed). |