forked from mariadb-corporation/dev-example-nosql-listener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaxscale.cnf
76 lines (64 loc) · 1.47 KB
/
maxscale.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[maxscale]
threads=auto
admin_secure_gui=false
# this enables external access to the REST API outside of localhost
# please review / modify for any public / non development environments
admin_host=0.0.0.0
# Server definitions
#
# Set the address of the server to the network
# address of a MariaDB server.
#
[server1]
type=server
address=mdb
port=3306
protocol=MariaDBBackend
# Monitor for the servers
#
# This will keep MaxScale aware of the state of the servers.
# MariaDB Monitor documentation:
# https://mariadb.com/kb/en/maxscale-25-monitors/
[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1
user=maxscale
password=Password123!
monitor_interval=2000
# Service definitions
#
# Service Definition for a read-only service and
# a read/write splitting service.
#
# ReadWriteSplit documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-25-readwritesplit/
[Read-Write-Service]
type=service
router=readwritesplit
servers=server1
user=maxscale
password=Password123!
# Listener definitions for the services
#
# These listeners represent the ports the
# services will listen on.
#
[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
# The NoSQL Listener
#
# Uses the new nosqlprotocol protocol
# Listens on port 17017
# Connects to MariaDB via the Read-Write-Service
#
[MongoDB-Listener]
type=listener
service=Read-Write-Service
protocol=nosqlprotocol
nosqlprotocol.user=maxscale
nosqlprotocol.password=Password123!
port=17017