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

Readwritesplit (documentation of max_slave_replication_lag)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.4
    • Documentation
    • None
    • Centos 6
    • 2017-26

    Description

      Hi,

      I have a MariaDB cluster setup with 3 nodes. (10.60.1.85,10.60.1.86,10.60.1.87)

      I've tried to use mysqlslap to do testing.
      Basic test is do connect direct to 10.60.1.85 using this command.
      mysqlslap --host 10.60.1.85 --password=password --engine=innodb --auto-generate-sql --concurrency=10 --iterations=200

      Okay now I've setup maxscale on 10.60.1.4 on centos 6, with readwritesplit.
      If I setup the config to have only 1 server (10.60.1.85), no problem.

      Once I add a second server (10.60.1.86). I start getting random failures.
      For example.
      mysqlslap --host 127.0.0.1 --password=password --engine=innodb --auto-generate-sql --concurrency=10 --iterations=200
      mysqlslap: Cannot run query SELECT intcol1,charcol1 FROM t1 ERROR : Table 'mysqlslap.t1' doesn't exist

      Sometimes it complaints that it cannot create database.
      Sometimes it works.
      Adding the 3rd server, almost always guarantees some error.

      What my guess is that at the end of mysqlslap, it deletes the database mysqlslap and table t1 before the final few select statements.

      Not sure if this is a know issue or there is some option that I can use for testing without failures.

      I tries sysbench.. not sure what it does, but it never uses the secondary server for reads.
      Even if I turn off the transactions.

      Anyway here is my maxscale config file.

      # MaxScale documentation on GitHub:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Documentation-Contents.md
       
      # Global parameters
      #
      # Complete list of configuration options:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Getting-Started/Configuration-Guide.md
       
      [maxscale]
      threads=1
      # Server definitions
      #
      # Set the address of the server to the network
      # address of a MySQL server.
      #
       
      [server1]
      type=server
      address=10.60.1.85
      port=3306
      protocol=MySQLBackend
      priority=1
      #wight=1
       
      [server2]
      type=server
      address=10.60.1.86
      port=3306
      protocol=MySQLBackend
      priority=2
      #weight=5
       
      [server3]
      type=server
      address=10.60.1.87
      port=3306
      protocol=MySQLBackend
      priority=3
      #weight=5
      # Monitor for the servers
      #
      # This will keep MaxScale aware of the state of the servers.
      # MySQL Monitor documentation:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Monitors/MySQL-Monitor.md
       
      [MySQL Monitor]
      type=monitor
      module=galeramon
      #servers=server1,server2,server3
      servers=server1,server2
      user=root
      passwd=password
      monitor_interval=10000
      use_priority=true
       
      # Service definitions
      #
      # Service Definition for a read-only service and
      # a read/write splitting service.
      #
       
      # ReadConnRoute documentation:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Routers/ReadConnRoute.md
       
      #[Read-Only Service]
      #type=service
      #router=readconnroute
      #servers=server1
      #user=myuser
      #passwd=mypwd
      #router_options=slave
       
      # ReadWriteSplit documentation:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Routers/ReadWriteSplit.md
       
      [Read-Write Service]
      type=service
      router=readwritesplit
      #router=readconnroute
      #servers=server1,server2,server3
      servers=server1,server2
      user=root
      passwd=password
      enable_root_user=1
      max_slave_connections=100%
      router_options=slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
       
      # This service enables the use of the MaxAdmin interface
      # MaxScale administration guide:
      # https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Reference/MaxAdmin.md
       
      [MaxAdmin Service]
      type=service
      router=cli
       
      # Listener definitions for the services
      #
      # These listeners represent the ports the
      # services will listen on.
      #
       
      #[Read-Only Listener]
      #type=listener
      #service=Read-Only Service
      #protocol=MySQLClient
      #port=4008
       
      [Read-Write Listener]
      type=listener
      service=Read-Write Service
      protocol=MySQLClient
      port=3306
       
      [MaxAdmin Listener]
      type=listener
      service=MaxAdmin Service
      protocol=maxscaled
      #socket=default
      address=localhost
      port=6603
      

      Attachments

        Activity

          People

            markus makela markus makela
            Michaelv Michael Van Der Beek
            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.