[maxscale]
threads=4
log_info=1
libdir=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_LIBDIR@
logdir=@CMAKE_INSTALL_PREFIX@/secondary/log/maxscale/
datadir=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale
cachedir=@CMAKE_INSTALL_PREFIX@/secondary/cache/maxscale
language=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale/
piddir=@CMAKE_INSTALL_PREFIX@/secondary/run/maxscale
config_persistdir=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale/
admin_auth=false
admin_port=8990

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3,server4
user=maxuser
passwd=maxpwd
monitor_interval=10000

[RW-Split-Router]
type=service
router=readwritesplit
servers=server1,server2,server3,server4
user=maxuser
passwd=maxpwd
max_slave_connections=100%

[SchemaRouter-Router]
type=service
router=schemarouter
servers=server1,server2,server3,server4
user=maxuser
passwd=maxpwd
auth_all_servers=1

[RW-Split-Hint-Router]
type=service
router=readwritesplit
servers=server1,server2,server3,server4
user=maxuser
passwd=maxpwd
max_slave_connections=100%
filters=Hint

[Read-Connection-Router]
type=service
router=readconnroute
router_options=master
servers=server1
user=maxuser
passwd=maxpwd

[Hint]
type=filter
module=hintfilter

[recurse3]
type=filter
module=tee
service=RW-Split-Router

[recurse2]
type=filter
module=tee
service=Read-Connection-Router

[recurse1]
type=filter
module=tee
service=RW-Split-Hint-Router

[CLI]
type=service
router=cli

[Read-Connection-Listener]
type=listener
service=Read-Connection-Router
protocol=MariaDBClient
port=5008

[RW-Split-Listener]
type=listener
service=RW-Split-Router
protocol=MariaDBClient
port=5006

[SchemaRouter-Listener]
type=listener
service=SchemaRouter-Router
protocol=MariaDBClient
port=5010

[RW-Split-Hint-Listener]
type=listener
service=RW-Split-Hint-Router
protocol=MariaDBClient
port=5009

[CLI-Listener]
type=listener
service=CLI
protocol=maxscaled
socket=/tmp/maxadmin2.sock

[server1]
type=server
address=127.0.0.1
port=3000
protocol=MariaDBBackend

[server2]
type=server
address=127.0.0.1
port=3001
protocol=MariaDBBackend

[server3]
type=server
address=127.0.0.1
port=3002
protocol=MariaDBBackend

[server4]
type=server
address=127.0.0.1
port=3003
protocol=MariaDBBackend
