# Global parameters # # Set the number of threads to a value # equal to the number of CPU cores. # [maxscale] threads=4 # Server definitions # # Set the address of the server to the network # address of a MySQL server. # [server1] type=server address=127.0.0.1 port=3306 protocol=MySQLBackend # Monitor for the servers # # This will keep MaxScale aware of the state of the servers. # [MySQL Monitor] type=monitor module=mysqlmon servers=server1 user=myuser passwd=mypwd monitor_interval=10000 # Service definitions # # Service Definition for a read-only service and # a read/write splitting service. # [Read-Only Service] type=service router=readconnroute servers=server1 user=myuser passwd=mypwd router_options=slave [Read-Write Service] type=service router=readwritesplit servers=server1 user=myuser passwd=mypwd max_slave_connections=100% # This service enables the use of the MaxAdmin interface [MaxAdmin Service] type=service router=cli # Listener definitions for the services # # These listeners represent the ports the # services will listen on. # [Read-Only Listener] type=listener service=Read-Only Service protocol=MySQLClient port=4008 [Read-Write Listener] type=listener service=Read-Write Service protocol=MySQLClient port=4006 [MaxAdmin Listener] type=listener service=MaxAdmin Service protocol=maxscaled port=6603