107 lines
2.0 KiB
INI
107 lines
2.0 KiB
INI
#
|
|
# Example gateway.cnf configuration file
|
|
#
|
|
#
|
|
#
|
|
# Configuration session
|
|
# Valid options are:
|
|
# threads=<number of epoll threads>
|
|
[gateway]
|
|
threads=1
|
|
|
|
|
|
# A series of service definition
|
|
# Valid options are
|
|
# router=<name of router module>
|
|
# servers=<server name>,<server name>,...
|
|
# user=<User to fetch password inforamtion with>
|
|
# auth=<Password of the user, plain text currently>
|
|
#
|
|
# Valid router modules currently are:
|
|
# readwritesplit, readconnroute and debugcli
|
|
[RW Split Service]
|
|
type=service
|
|
router=readwritesplit
|
|
servers=server1,server2,server3
|
|
user=maxuser
|
|
auth=maxpwd
|
|
|
|
[Test Service]
|
|
type=service
|
|
router=readconnroute
|
|
router_options=slave
|
|
servers=server1,server2,server3
|
|
user=maxuser
|
|
auth=maxpwd
|
|
|
|
# Definition of the servers
|
|
[server1]
|
|
type=server
|
|
address=127.0.0.1
|
|
port=3000
|
|
protocol=MySQLBackend
|
|
|
|
[server2]
|
|
type=server
|
|
address=127.0.0.1
|
|
port=3001
|
|
protocol=MySQLBackend
|
|
|
|
[server3]
|
|
type=server
|
|
address=127.0.0.1
|
|
port=3002
|
|
protocol=MySQLBackend
|
|
|
|
[Debug Service]
|
|
type=service
|
|
router=debugcli
|
|
|
|
# Listener definitions for the services
|
|
# Valid options are:
|
|
# service=<name of service defined elsewhere>
|
|
# protocol=<name of protocol module with which to listen>
|
|
# port<Listening port>
|
|
[Debug Listener]
|
|
type=listener
|
|
service=Debug Service
|
|
protocol=telnetd
|
|
port=4442
|
|
|
|
[Test Listener]
|
|
type=listener
|
|
service=Test Service
|
|
protocol=MySQLClient
|
|
port=4008
|
|
|
|
[RW Split Listener]
|
|
type=listener
|
|
service=RW Split Service
|
|
protocol=MySQLClient
|
|
port=4006
|
|
|
|
# Define a monitor that can be used to determine the state and role of
|
|
# the servers.
|
|
# Valid options are:
|
|
# module=<name of module to load>
|
|
# servers=<server name>,<server name>,...
|
|
# user=<user name - must have slave replication and slave client privileges>
|
|
# passwd=<password of the above user, plain text currently>
|
|
[MySQL Monitor]
|
|
type=monitor
|
|
module=mysqlmon
|
|
servers=server1,server2,server3
|
|
user=maxuser
|
|
passwd=maxpwd
|
|
|
|
|
|
[HTTPD Service]
|
|
type=service
|
|
router=testroute
|
|
|
|
[HTTPD Listener]
|
|
type=listener
|
|
service=HTTPD Service
|
|
protocol=HTTPD
|
|
port=6444
|