#defines MySQL Query Rulesmysql_query_rules:(# {# rule_id=1# active=1# match_pattern="^SELECT .* FOR UPDATE$"# destination_hostgroup=0# apply=1# },# {# rule_id=2# active=1# match_pattern="^SELECT"# destination_hostgroup=1# apply=1# }{rule_id=100active=1match_pattern="^SELECT .* FOR UPDATE"destination_hostgroup=10apply=1},{rule_id=200active=1match_pattern="^SELECT .*"destination_hostgroup=10apply=1},{rule_id=300active=1match_pattern=".*"destination_hostgroup=10apply=1},)
# defines all the MySQL serversmysql_servers =(# {# address = "127.0.0.1" # no default, required . If port is 0 , address is interpred as a Unix Socket Domain# port = 3306 # no default, required . If port is 0 , address is interpred as a Unix Socket Domain# hostgroup = 0 # no default, required# status = "ONLINE" # default: ONLINE# weight = 1 # default: 1# compression = 0 # default: 0# max_replication_lag = 10 # default 0 . If greater than 0 and replication lag passes such threshold, the server is shunned# },# {# address = "/var/lib/mysql/mysql.sock"# port = 0# hostgroup = 0# },# {# address="127.0.0.1"# port=21891# hostgroup=0# max_connections=200# },# { address="127.0.0.2" , port=3306 , hostgroup=0, max_connections=5 },# { address="127.0.0.1" , port=21892 , hostgroup=1 },# { address="127.0.0.1" , port=21893 , hostgroup=1 }# { address="127.0.0.2" , port=3306 , hostgroup=1 },# { address="127.0.0.3" , port=3306 , hostgroup=1 },# { address="127.0.0.4" , port=3306 , hostgroup=1 },# { address="/var/lib/mysql/mysql.sock" , port=0 , hostgroup=1 }{ address="10.0.0.1" , port=3306 , hostgroup=10 },{ address="10.0.0.2" , port=3306 , hostgroup=10 },{ address="10.0.0.3" , port=3306 , hostgroup=10 }{ address="10.0.0.1" , port=3306 , hostgroup=20 },{ address="10.0.0.2" , port=3306 , hostgroup=20 },{ address="10.0.0.3" , port=3306 , hostgroup=20 },)
replication_hostgroups:(writer_hostgroup=10reader_hostgroup=20)
5. Where should the read/write split be defined?
6. Is it one or multiple directives in different config parts?
--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
datadir="/var/lib/proxysql"
admin_variables={ admin_credentials="admin:uberpass" mysql_ifaces="127.0.0.1:6032;10.0.0.14:6032;/tmp/proxysql_admin.sock"}
mysql_variables={ connect_retries_on_failure=10 connect_timeout_server=10000 default_query_timeout=36000000 max_connections=2048 monitor_connect_interval=60000 monitor_connect_timeout=200 monitor_username="proxysql-monitor" monitor_password="uberpass" monitor_ping_interval=30000 monitor_replication_lag_timeout=1000 query_retries_on_failure=1000 server_capabilities=45578 server_version="5.1.30" }
mysql_servers =( { address="10.0.0.12" , port=3306 , hostgroup=10, max_connections=100, max_replication_lag=10 }, { address="10.0.0.13" , port=3306 , hostgroup=10, max_connections=100, max_replication_lag=10 }, { address="10.0.0.15" , port=3306 , hostgroup=10, max_connections=100, max_replication_lag=10 }, { address="10.0.0.12" , port=3306 , hostgroup=20, max_connections=100, max_replication_lag=10 }, { address="10.0.0.13" , port=3306 , hostgroup=20, max_connections=100, max_replication_lag=10 }, { address="10.0.0.15" , port=3306 , hostgroup=20, max_connections=100, max_replication_lag=10 })
mysql_users:( { username = "admin" password = "admin" default_hostgroup = 10 max_connections = 10000 default_schema="information_schema" active = 1 })
mysql_query_rules:( { rule_id=100 active=1 match_pattern=".*@.*" destination_hostgroup=10 apply=1 }, { rule_id=200 active=1 match_pattern="^SELECT.*" destination_hostgroup=20 apply=0 }, { rule_id=300 active=1 match_pattern="^SELECT.*FOR UPDATE" destination_hostgroup=10 apply=1 })scheduler=( { id=1 active=1 interval_ms=1000 filename="/var/lib/proxysql/proxysql_galera_checker.sh" arg1="10" arg2="20" arg3="1" arg4="1" arg5="/var/lib/proxysql/proxysql_galera_checker.log" })mysql_replication_hostgroups=( { writer_hostgroup=10 reader_hostgroup=20 } )