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

weightby and readwritesplit not working as expected

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: readwritesplit
    • Labels:
      None
    • Environment:
      CentOS 6.7
      maxscale-1.3.0-1.x86_64

      Description

      one master: percona1
      two slaves: percona2 and percona3

      I've configured weithby to load balance the requests 90% and 10%, but they are always spread in 50% each:

      [Splitter Service]
      type=service
      router=readwritesplit
      servers=percona1, percona2, percona3
      max_slave_replication_lag=30
      weightby=myweight
      user=maxscale
      passwd=percona
       
      [percona2]
      type=server
      address=192.168.90.3
      port=3306
      protocol=MySQLBackend
      myweight=1
       
      [percona3]
      type=server
      address=192.168.90.4
      port=3306
      protocol=MySQLBackend
      myweight=9
       
      # maxadmin -pmariadb show service "Splitter Service"
      Service 0x202b460
      	Service:                             Splitter Service
      	Router:                              readwritesplit (0x7f7b78323540)
      	State:                                       Started
      	Number of router sessions:           	200
      	Current no. of router sessions:      	100
      	Number of queries forwarded:          	600
      	Number of queries forwarded to master:	0
      	Number of queries forwarded to slave: 	600
      	Number of queries forwarded to all:   	0
      	Master/Slave percentage:		0.00%
      	Connection distribution based on myweight server parameter.
      		Server               Target %    Connections  Operations
      		                               Global  Router
      		percona3             90.0%     100     100     50
      		percona2             10.0%     100     100     50
      		percona1             100.0%     100     100     0
      	Started:                             Wed Feb 24 13:55:48 2016
      	Root user access:                    Disabled
      	Backend databases
      		192.168.90.4:3306  Protocol: MySQLBackend
      		192.168.90.3:3306  Protocol: MySQLBackend
      		192.168.90.2:3306  Protocol: MySQLBackend
      	Routing weight parameter:            myweight
      	Users data:                          0x20297c0
      	Total connections:                   202
      	Currently connected:                 102
      	SSL:  Disabled

      I expect to have 90% and 10% of operations like showed in the target, or do I miss something ?

      Thank you,

        Attachments

          Activity

            People

            • Assignee:
              markus makela markus makela
              Reporter:
              lefred Frederic -lefred- Descamps
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: