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

Route Select / Read Only to Node Master Only using readwritesplit

    XMLWordPrintable

    Details

      Description

      how to route query read only to node master ? I using readwritesplit routing.
      temporary solution i remove node slave (db_190) from readwriteservice.

      but if node master is failed i need manually link / add node_slave to readwriteservice.

      this is my maxscale configuration

      [DB_190]
      type=server
      address=192.168.101.190
      port=13306
      protocol=MySQLBackend
      serv_weight=4
       
      [DB_191]
      type=server
      address=192.168.101.191
      port=13306
      protocol=MySQLBackend
      serv_weight=0
       
      [MariaDB-Monitor-Test]
      type=monitor
      module=mysqlmon
      servers=DB_190,DB_191
      user=maxscale
      password=C03D51AE93155CD3F74698A38697232C
      monitor_interval=1000
      auto_failover=true
      detect_stale_master=true
      failover_timeout=10
      auto_rejoin=true
      failcount=5
      master_failure_timeout=2
      verify_master_failure=true
      switchover_timeout=90
      replication_user=maxscale
      replication_password=C03D51AE93155CD3F74698A38697232C
      detect_stale_slave=true
       
      [Read-Write-Service-Test]
      type=service
      router=readwritesplit
      servers=DB_190,DB_191
      user=maxscale
      password=C03D51AE93155CD3F74698A38697232C
      master_failure_mode=fail_on_write
      strict_multi_stmt=false
      use_sql_variables_in=master
      master_reconnection=true
      delayed_retry=true
      delayed_retry_timeout=20s
      transaction_replay=true
      causal_reads=true
      causal_reads_timeout=20s
      weightby=serv_weight
      slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
      master_accept_reads=true
      max_slave_connections=0
       
      [Read-Write-Listener-Test]
      type=listener
      service=Read-Write-Service-Test
      protocol=MySQLClient
      port=13306
      authenticator=MySQLAuth
      authenticator_options=lower_case_table_names=true
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            febridev febriyant
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: