# Global parameters [maxscale] threads=auto [server1] type=server address=master port=3306 protocol=MariaDBBackend [server2] type=server address=slave1 port=3306 protocol=MariaDBBackend [server3] type=server address=slave2 port=3306 protocol=MariaDBBackend # Monitor for the servers # This will keep MaxScale aware of the state of the servers. # MySQL Monitor documentation: # https://github.com/mariadb-corporation/MaxScale/blob/2.2/Documentation/Monitors/MariaDB-Monitor.md [MariaDB-Monitor] type=monitor module=mariadbmon servers=server1,server2,server3 user=maxuser password=maxpwd monitor_interval=2000 # Service definitions # Service Definition for a read-only service and a read/write splitting service. # ReadConnRoute documentation: # https://github.com/mariadb-corporation/MaxScale/blob/2.2/Documentation/Routers/ReadConnRoute.md [Read-Only-Service] type=service router=readconnroute servers=server1,server2,server3 user=maxuser password=maxpwd router_options=slave # ReadWriteSplit documentation: # https://github.com/mariadb-corporation/MaxScale/blob/2.2/Documentation/Routers/ReadWriteSplit.md [Read-Write-Service] type=service router=readwritesplit servers=server1,server2,server3 user=maxuser password=maxpwd # Listener definitions for the services # 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