Skip to main content

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