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

Readconnroute load balancing is not atomic

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Incomplete
    • 2.4.9
    • N/A
    • readconnroute
    • None
    • RHEL7
      3 nodes Percona XtraDB Cluster & MaxScale

    Description

      It's possible that two threads can both pick the same server when one of the threads should pick another server. This happens because the server selection process doesn't try to repeat the selection process if another thread manages to increment the counter before it. In the end this will cause transient small imbalances in the connection counts between servers.

      Original description:


      Hi,

      I have found some strange thing with V 2.4 in synced mode.

      If I try a sysbench by example with 15 thread, normally, the connections are splitted by the numbers of nodes (so 5 co by node in this context).

      Cf conf:

      [root@router ~]# cat /etc/maxscale.cnf
      [maxscale]
      threads=auto
       
      [dbserv1]
      type=server
      address=192.168.116.111
      port=3306
      protocol=MariaDBBackend
       
      [dbserv2]
      type=server
      address=192.168.116.112
      port=3306
      protocol=MariaDBBackend
       
      [dbserv3]
      type=server
      address=192.168.116.113
      port=3306
      protocol=MariaDBBackend
       
      [Galera-Monitor]
      type=monitor
      module=galeramon
      servers=dbserv1, dbserv2, dbserv3
      user=monitor_user
      passwd=my_password
      monitor_interval=2000
       
      [Galera-Service]
      type=service
      router=readconnroute
      router_options=synced
      servers=dbserv1, dbserv2, dbserv3
      user=maxscale
      passwd=maxscale_pw
       
      [Galera-Listener]
      type=listener
      service=Galera-Service
      protocol=MariaDBClient
      port=4306
      

      Once I launch maxctrl list servers:

      │ dbserv1 │ dbserv1 │ 3306 │ 7           │ Slave, Synced, Running  │      │
      ├──────────────┼────────────────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
      │ dbserv2 │ dbserv2 │ 3306 │ 4           │ Master, Synced, Running │      │
      ├──────────────┼────────────────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
      │ dbserv3 │ dbserv3 │ 3306 │ 4           │ Slave, Synced, Running  │      │
      

      Why the traffic is not splitted by 3 on each node?

      Best regards,

      Attachments

        Activity

          People

            markus makela markus makela
            anthosz Anthony
            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.