Basic three node load balancer
Preaparations
dnf repolist | grep -i maxscale
mariadb-maxscale MariaDB MaxScale
```bash
dnf install \
maxscale \
MariaDB-client
systemctl enable maxscale
systemctl start maxscale
systemctl status maxscale
ss -ntap | grep -i maxscale
systemctl stop maxscale
maxctrl destroy user superadmin
maxctrl create user superadmin superpass --type admin
list servers
create server lt58ncp1dbn1 192.168.56.104 3306
create server lt58ncp1dbn2 192.168.56.105 3306
create server lt58ncp1dbn3 192.168.56.106 3306
alter server lt58ncp1dbn1 ssl true
alter server lt58ncp1dbn2 ssl true
alter server lt58ncp1dbn3 ssl true
list servers
create monitor mon galeramon user=maxscale password=superpass servers=lt58ncp1dbn1,lt58ncp1dbn2,lt58ncp1dbn3
list monitors
list services
create service rr-service readconnroute user=maxscale password=superpass
show service rr-service
link service rr-service lt58ncp1dbn1
link service rr-service lt58ncp1dbn2
link service rr-service lt58ncp1dbn3
start service rr-service
list listeners
create listener rr-service rr-listener 3306
list listeners
Cleaning up
stop service
unlink service rr-service lt58ncp1dbn1
unlink service rr-service lt58ncp1dbn2
unlink service rr-service lt58ncp1dbn3
destroy listener rr-listener
destroy service rr-service
list services
unlink monitor mon lt58ncp1dbn1 lt58ncp1dbn2 lt58ncp1dbn3
stop monitor mon
destroy monitor mon
destroy server lt58ncp1dbn1
destroy server lt58ncp1dbn2
destroy server lt58ncp1dbn3
list servers
No Comments