cat /etc/maxscale.cnf =========================== # MaxScale documentation: # https://mariadb.com/kb/en/mariadb-maxscale-6/ # Global parameters # # Complete list of configuration options: # https://mariadb.com/kb/en/mariadb-maxscale-6-mariadb-maxscale-configuration-guide/ [maxscale] threads=auto admin_host = 0.0.0.0 admin_port = 8989 admin_enabled=true admin_secure_gui=false # Server definitions # # Set the address of the server to the network # address of a MariaDB server. # [PP_MTR_MAIN_DB1] type=server address=172.18.96.40 port=3306 protocol=MariaDBBackend ssl=true ssl_cert=/opt/galera/cert/crt.maxscale.pem ssl_key=/opt/galera/cert/key.csr.maxscale.pem ssl_ca_cert=/opt/galera/cert/crt.ca.maxscale.pem #max_routing_connections=13950 #persistpoolmax=13950 #persistmaxtime=10s [PP_MTR_MAIN_DB2] type=server address=172.18.96.11 port=3306 protocol=MariaDBBackend ssl=true ssl_cert=/opt/galera/cert/crt.maxscale.pem ssl_key=/opt/galera/cert/key.csr.maxscale.pem ssl_ca_cert=/opt/galera/cert/crt.ca.maxscale.pem #max_routing_connections=13950 #persistpoolmax=13950 #persistmaxtime=10s [PP_MTR_MAIN_DB3] type=server address=172.18.96.37 port=3306 protocol=MariaDBBackend ssl=true ssl_cert=/opt/galera/cert/crt.maxscale.pem ssl_key=/opt/galera/cert/key.csr.maxscale.pem ssl_ca_cert=/opt/galera/cert/crt.ca.maxscale.pem #max_routing_connections=13950 #persistpoolmax=13950 #persistmaxtime=10s # Monitor for the servers # # This will keep MaxScale aware of the state of the servers. # MariaDB Monitor documentation: # https://mariadb.com/kb/en/maxscale-6-monitors/ [Galera-Monitor] type=monitor module=galeramon servers=PP_MTR_MAIN_DB1,PP_MTR_MAIN_DB2,PP_MTR_MAIN_DB3 user=maxscaleuser password=XXXXXXXX monitor_interval=1000ms disable_master_failback=true available_when_donor=true backend_write_timeout=3s backend_read_timeout=3s #disk_space_threshold=/product/:95 #disk_space_check_interval=10000ms #maintenance_on_low_disk_space=true # Service definitions # # Service Definition for a read-only service and # a read/write splitting service. # # ReadConnRoute documentation: # https://mariadb.com/kb/en/mariadb-maxscale-6-readconnroute/ [maxscalecache] type=filter module=cache storage=storage_inmemory #soft_ttl=30 #hard_ttl=45 cached_data=shared #cached_data=thread_specific max_size=100Mi #selects=verify_cacheable selects=assume_cacheable [Galera-Service] type=service router=readwritesplit enable_root_user=true #router=readconnroute servers=PP_MTR_MAIN_DB1,PP_MTR_MAIN_DB2,PP_MTR_MAIN_DB3 user=maxscale password=XXXXXXXX master_accept_reads=false #master_reconnection=true #master_failure_mode=error_on_write #transaction_replay_retry_on_deadlock=true #transaction_replay=true #slave_selection_criteria=ADAPTIVE_ROUTING filters=maxscalecache #max_slave_connections=1 transaction_replay=true #idle_session_pool_time=500ms lazy_connect=false connection_keepalive=0s retain_last_statements=50 #max_connections = 9950 auth_all_servers=true #connection_timeout=1860s # ReadWriteSplit documentation: # https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit/ # Listener definitions for the services # # These listeners represent the ports the # services will listen on. # [Galera-Listener] address=0.0.0.0 type=listener service=Galera-Service protocol=MariaDBClient port=3307 ssl=false ssl_cert=/opt/galera/cert/crt.maxscale.pem ssl_key=/opt/galera/cert/key.csr.maxscale.pem ssl_ca_cert=/opt/galera/cert/crt.ca.maxscale.pem