Emergency

[ProxySQL]Change of weight value on mysql_servers table

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [ProxySQL]Change of weight value on mysql_servers table

    Hi
    I was set up PXC & ProxySQL for some testing.
    I made host group 0 that included host1 and host2.
    And I would like to use these servers like this:
    host1 : primary for write transaction
    host2 : secondary for write transaction

    So I expected that host1 processes most of write transaction, and host2 processes write transaction if host1 is down.
    And then I expected host1 processes write transaction again, if host1 is recovered.

    I set mysql_server table like this.
    +--------------+--------------+--------+-----------+
    | hostgroup_id | hostname | status | weight |
    +--------------+--------------+--------+-----------+
    | 0 | host1 | ONLINE | 1000000 |
    | 0 | host2 | ONLINE | 1000 |
    +--------------+--------------+--------+-----------+

    It is working well at first as I expect.
    But if host1 is stop and start, weight value of host1 is changed default value(1000).
    +--------------+--------------+--------+--------+
    | hostgroup_id | hostname | status | weight |
    +--------------+--------------+--------+--------+
    | 0 | host1 | ONLINE | 1000 |
    | 0 | host2 | ONLINE | 1000 |
    +--------------+--------------+--------+--------+

    How can I do not to change weight value of host1 ?




  • #2
    Hi, i just want to report that i have the same issue with a 3 node pxc and proxySQL.
    ProxySQL version is 1.3.7-1-1 (from percona repo).

    Does it come from the proxysql_galera_checker script that reload the mysql_server table without passing the weight argument ?

    Can an expert from Percona look at this issue ?

    thanks

    Comment


    • #3
      i found that the change come from the /usr/bin/proxysql_node_monitor script installed by the Percona's proxysql package.
      it is also in the github : https://github.com/percona/proxysql-...l_node_monitor

      Comment

      Working...
      X