Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1357

master_accept_reads enabled and slave doesn't get any load in ReadWrite split mode

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.1.4, 2.1.5
    • N/A
    • N/A
    • None
    • Debian Jessie on VMWARE

    Description

      Hello,

      I have following Maxscale configuration for read-write splitting the load between maria1 and maria3; maria2 is used for backup purpose only so it has the last priority and weight=0.

      This configuration is used for a Galera Cluster of 3 MariaDB nodes in 10.1 version branch.

      I'm using Maxscale 2.1.4 and I don't know why but the SELECT statements go all to maria1, and none to maria3.

      [RW]
      type=service
      router=readwritesplit
      servers=maria1,maria2,maria3
      max_slave_connections=1
      router_options=slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS,master_accept_reads=true
      user=mastersplit
      localhost_match_wildcard_host=1
      weightby=myweight
       
       
      [maria1]
      type=server
      address=10.181.111.74
      protocol=MySQLBackend
      priority=1
      myweight=1
       
      [maria2]
      type=server
      address=10.181.111.32
      protocol=MySQLBackend
      priority=3
      myweight=0
       
      [maria3]
      type=server
      address=10.181.111.14
      protocol=MySQLBackend
      priority=2
      myweight=1
      

      The command

      SELECT @@hostname

      is always returning the first node's name even without the option master_accept_reads.

      I also tried with :

      router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS,master_accept_reads=true
      

      I attached a screen cap of the observed load of queries on all 3 servers grouped by query type.

      Node 1 is getting all the load from maxscale and node 3 isn't even getting a part of the SELECT load.

      The strange thing this is that maxscale's RW Split service shows that 49% goes to slaves :
      Number of queries forwarded to master: 17530969 (50.20%)
      Number of queries forwarded to slave: 17392880 (49.80%)
      Number of queries forwarded to all: 5062417 (14.50%)

      But as master_accept_reads=1, it seems that master=master and slave=master too without the weight being taken into account because there isn't event 10% load going to node 3.

      Expected behavior would be :75% of the load going to master (50% as master + 25% because master_accept_reads=1 and weight is 1/2) and 25% of the SELECT load going to slave node3.

      Attachments

        Activity

          People

            markus makela markus makela
            jom Maiavria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.