pxc-scheduler-handler配置¶
ProxySQL与pxc-scheduler-handler将参数存储在一个配置文件,使用toml格式。这个文件定义了服务器证书和其他设置。
使用——配置文件选项来运行pxc-scheduler-handler脚本。
警告
我们不推荐将调度程序配置文件存储在主目录。
一个配置文件的例子¶
一个配置文件是用于控制pxc-scheduler-handler操作。文件可以根据需要被改变。管理员控制工具可以访问受保护的资源。
#为详细的手册,看到# https://github.com/percona/pxc_scheduler雷竞技下载官网_handler how-to-configure-pxc-scheduler-handler [pxccluster] activeFailover = 1退回= false checkTimeOut = 2000 pingTimeout = 1000 mainSegment client-cert = 0 sslClient =”。pem client-key sslKey =。pem”sslCa = " ca.pem " sslCertificatePath = " /路径/ / ssl_cert”hgW = 100 hgR = 101 configHgRange = 8000 maintenanceHgRange = 9000 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #设置为true如果有一个作家节点。如果这是集#然后maxNumWriters假定为1。# #容许值:真的,假#默认:假# singlePrimary = true # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #将作家节点所需的数量。# #的值被认为是1如果singlePrimary是真的。# #如果这是将一个值从1到100,然后查询规则#设置一个独特的作家hostgroup(写发送#作家hostgroup发送和阅读读者hostgroup)。# #如果这是设置为值> 100,那么所有查询(读和写)# hostgroup被发送到的作家。这被认为是一个#负载平衡的场景中,所有节点都是等价的,并接受#读和写。# #默认(没有):# maxNumWriters = 1 writerIsAlsoReader = 1 retryUp = 0 retryDown = 2 clusterId = 10 #控制主要设置在故障转移。#更多的细节在https://github.com/percona/pxc雷竞技下载官网_scheduler_handler # persist-primary-values # #允许的值:# # 0禁用# 1只坚持写设置# 2持续读写设置persistPrimarySettings = 0 # = = proxysql = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # proxysql ProxySQL-specific信息部分。 # # These settings will be read and used whenever the scheduler is run. # [proxysql] port = 6032 host = "127.0.0.1" user = "" password = "" clustered = false lockfilepath ="/var/run/pxc_scheduler_handler" respectManualOfflineSoft=false pingTimeout = 1000 #== global ====================================================== # The global section are for variables that are not ProxySQL or # cluster specific. # # These settings will be read and used whenever the scheduler is run. # [global] debug = true # stdout: output is redirected to proxysql logs # file: output is written to the file pointed by logFile. When setting to ``file`, ensure that the user `proxysql:proxysql` has the appropriate permissions to write to this location. logTarget = "stdout" #stdout | file # Defines the log level to be used. # Allowed options are [error,warning,info,debug] logLevel = "info" logFile = "/var/log/pxc_scheduler_handler/pscheduler.log" # Should be set to false if we are pxc_scheduler_handler through percona-scheduler-admin. daemonize = false daemonInterval = 2000 # boolean variable which enables reporting of statistics. performance = true # Not used currently OS = "na" # Time in seconds after which the file lock is considered expired [local instance lock] lockFileTimeout = 60 #seconds # Time in seconds after which the cluster lock is considered expired lockClusterTimeout = 600 #seconds #== setup ======================================================= # These variables are used only upon Setup # Changing these variables after setup will not affect operation # [setup] # -------------------------------- # The clusterAppUser is the ProxySQL user account that should be # used by clients to access the cluster. # # Uncomment the following options (clusterAppUser and clusterAppUserPassword) # to enable the setting of the clusterAppUser for this cluster. # #clusterAppUser="proxysql_user" #clusterAppUserPassword="passw0rd" # -------------------------------- # The monitorUser is used by ProxySQL to access the servers and # check the connections. # monitorUser="monitor" monitorUserPassword="monitor" # -------------------------------- # The clusterXXX information is used to setup the cluster for # use by ProxySQL. # clusterHost="" clusterPort=3306 clusterUser="admin" clusterUserPassword="admin" # -------------------------------- # ProxySQL will use SSL to connect to the backend servers # useSSL=0 # -------------------------------- # Max number of connections from ProxySQL to the backend servers. # maxConnections=1000 # -------------------------------- # Defines how frequently (in milliseconds) the scheduler must be run # nodeCheckInterval=2000
最后更新:2023-03-24