NY Meetup: Scaling MariaDB with Maxscale

Wagner Bianchi
Wagner BianchiPrincipal RDBA, DBOps, Project, Process & Services Addicted, Oracle ACE Diretor at MariaDB Corporation
Scaling Out MariaDB
Server w/ MaxScale
By Wagner Bianchi
Principal RDBA
wagner.bianchi@mariadb.com
M|17
The Conrad Hotel, NYC
April 11 - 12, 2017
m17.mariadb.com
Promo code: BIGAPPLE
Europe Roadshow

Locations in May & June
Berlin

May 18
Munich

May 11
Bonn

June 30
Amsterdam

May 23
Paris
June 30
Madrid

May 18
Milan
May 11
Details and registration:
http://go.mariadb.com/Europe-Roadshow-LP.html
More dates and locations will be announced soon!
Meetup’s Agenda
• With MariaDB Server:
• Replication::ReadWriteSplit;
• Replication::ConnectionRouting;
• Replication::SchemaRouter;
• With MariaDB Cluster:
• Configuring it as Master/Slave cluster
• New features MaxScale 2.1 (coming soon)
4
Scalability and, what are we talking about?
5
Scaling-Out MariaDB Server
6
MariaDB Server, Replication::ReadWriteSplit
• The readwritesplit router is designed to increase the read-only processing capability of
a cluster while maintaining consistency;
• This is achieved by splitting the query load into read and write queries;
• Read queries, which do not modify data, are spread across multiple nodes while all write
queries will be sent to a single node;
• This router is designed to be used with a traditional Master-Slave replication cluster;
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
myrocksdb01 | 192.168.50.11 | 3306 | 0 | Master, Running
myrocksdb02 | 192.168.50.12 | 3306 | 0 | Slave, Running
myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running
-------------------+-----------------+-------+-------------+--------------------
7
MariaDB Server, Replication::ReadWriteSplit
• The following operations are routed to master:
• write statements;
• all statements within an open transaction;
• stored procedure calls, and user-defined function calls;
• DDL statements (DROP|CREATE|ALTER TABLE … etc.);
• EXECUTE (prepared) statements;
• all statements using temporary tables.
8
MariaDB Server, Replication::ReadWriteSplit
• Queries which can be routed to slaves must be auto committed and belong to one of the
following group:
• read-only database queries;
• read-only queries to system, or user-defined variables;
• SHOW statements, and system function calls.
• Slaves can be set as per max_slave_connections as it sets the maximum number of
slaves a router session uses at any moment - default is all including master;
• One can use router_options to remove current master to the current read pool;
9
MariaDB Server, Replication::ReadWriteSplit
• router_options
• it may include multiple readwritesplit-specific options;
• slave_selection_criteria, how requests will be sent to slaves;
• LEAST_GLOBAL_CONNECTIONS, the slave with least connections
from MariaDB MaxScale
• LEAST_ROUTER_CONNECTIONS, the slave with least connections
from this service
• LEAST_BEHIND_MASTER, the slave with smallest replication lag
• LEAST_CURRENT_OPERATIONS (default), the slave with least active
operations
10
MariaDB Server, Replication::ReadWriteSplit
• router_options
• master_accept_reads = [true|false]
• the is the option that can include or remove master from the reading pool;
• master_failure_mode
• fail_instantly, when the failure of the master server is detected, the connection
will be closed immediately.
• fail_on_write, the client connection is closed if a write query is received when
no master is available.
• error_on_write, If no master is available and a write query is received, an
error is returned stating that the connection is in read-only mode.
11
MariaDB Server, Replication::ReadWriteSplit
[myrocksdb03]
type=server
address=192.168.50.13
port=3306
protocol=MySQLBackend
persistpoolmax=100
persistmaxtime=3600
[CLI]
type=service
router=cli
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
socket=default
[Splitter Service]
type=service
router=readwritesplit
servers=myrocksdb01,myrocksdb02,myrocksdb03
router_options=slave_selection_criteria=LEAST
_BEHIND_MASTER,master_accept_reads=FALSE,mast
er_failure_mode=erro
r_on_write
max_slave_connections=2
max_slave_replication_lag=30
user=maxuser
passwd=YqztlYG…
[Splitter Listener]
type=listener
service=Splitter Service
protocol=MySQLClient
port=3306
socket=/tmp/myrocksdb_cluster.sock
[Replication Monitor]
type=monitor
module=mysqlmon
servers=myrocksdb01,myrocksdb02,myroc
ksdb03
detect_replication_lag=1
detect_stale_master=1
user=maxuser
passwd=YqztlYG…
[myrocksdb01]
type=server
address=192.168.50.11
port=3306
protocol=MySQLBackend
persistpoolmax=100
persistmaxtime=3600
[myrocksdb02]
type=server
address=192.168.50.12
port=3306
protocol=MySQLBackend
persistpoolmax=100
persistmaxtime=3600
12
MariaDB Server, Replication::ConnectionRoute Router
• The readconnroute router provides simple and lightweight load balancing across a set
of servers;
• The router can also be configured to balance connections based on a weighting parameter
defined in the server's section;
• Differs from readwritesplit router as this router needs one port for reads and another
one for writes and router_options can be used as well;
• One can define a goos strategy here:
• point the master directly on the maxscale’s configuration file for writes;
• point the slaves for reads, in case a master crash, adjust configuration file and reload;
13
MariaDB Server, Replication::ConnectionRoute Router
• Let’s consider the following scenario:
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
myrocksdb01 | 192.168.50.11 | 3306 | 0 | Master, Running
myrocksdb02 | 192.168.50.12 | 3306 | 0 | Slave, Running
myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale> list services
Services.
--------------------------+----------------------+--------+---------------
Service Name | Router Module | #Users | Total Sessions
--------------------------+----------------------+--------+---------------
Write Service | readconnroute | 2 | 2
Read Service | readconnroute | 1 | 1
CLI | cli | 2 | 2
--------------------------+----------------------+--------+---------------
14
MariaDB Server, Replication::ConnectionRoute Router
• Let’s shutdown current master:
• We do the manual switch on the MariaDB server:
• reset slave all; on myrocksdb02;
• change master to master_host=‘myrocksdb02’; on myrocksdb03;
• On Maxscale, comment server myrocksdb01, remove it form the list of servers on [Replication
Monitor] and on Write Service, on the latter, put myrocksdb02;
• set server myrocksdb02 master
#: stop/crash current master
[root@box01 ~]# systemctl stop mariadb
#: maxscale logs
Server 192.168.50.11:3306 lost the master status.
Server changed state: myrocksdb01[192.168.50.11:3306]: master_down. [Master, Running] -> [Down]
15
MariaDB Server, Replication::ConnectionRoute Router
• After these…
#: new scenario
[root@maxscale maxscale_config]# maxadmin -e "list servers"
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
myrocksdb01 | 192.168.50.11 | 3306 | 0 | Down
myrocksdb02 | 192.168.50.12 | 3306 | 0 | Master, Running
myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running
-------------------+-----------------+-------+-------------+--------------------
#: maxscale logs
Update server protocol for server 192.168.50.13 to protocol MySQLBackend.
Update server protocol for server 192.168.50.12 to protocol MySQLBackend.
Update router for service Read Service to readconnroute.
Update router for service Write Service to readconnroute.
Server changed state: myrocksdb02[192.168.50.12:3306]: new_slave. [Master, Slave, Running] ->
[Slave, Running]
16
MariaDB Server, Replication::ConnectionRoute Router
• Configuration for readconnroute load balancer
[Write Service]
type=service
router=readconnroute
router_options=master
servers=myrocksdb01
user=maxuser
password=123456
[Read Service]
type=service
router=readconnroute
router_options=slave
servers=myrocksdb02,myrocksdb03
weightby=serv_weight
user=maxuser
password=123456
[Write Listener]
type=listener
service=Write Service
protocol=MySQLClient
port=33066
socket=/tmp/myrocksdb_readconnroute.sock
[Read Listener]
type=listener
service=Read Service
protocol=MySQLClient
port=33077
[myrocksdb01]
type=server
address=192.168.50.11
port=3306
protocol=MySQLBackend
[myrocksdb02]
type=server
address=192.168.50.12
port=3306
protocol=MySQLBackend
serv_weight=3
[myrocksdb03]
type=server
address=192.168.50.13
port=3306
protocol=MySQLBackend
serv_weight=2 17
MariaDB Server, Replication::SchemaRouter Module
18
Scaling-Out MariaDB Cluster
19
Scaling-Out MariaDB Cluster
• MaxScale makes your life easier when working with MariaDB Cluster:
• Checks on severs roles;
• Setup monitors and trigger alerts from nodes status changes;
• Transparently configure good practices in read/write split;
• Elect new “master" node to receive write traffic;
• Add a server under maintenance and clear up its status;
• One can use Galera Monitor or the ReadWriteSplit Module for MariaDB Cluster:
• Galera Monitor: http://bit.ly/2nshrOk
• ReadWriteSplit: http://bit.ly/2oTPXxY
20
Scaling-Out MariaDB Cluster
• Galera Monitor:
• The Galera Monitor is a monitoring module for MaxScale that monitors a Galera
cluster;
• It detects whether nodes are a part of the cluster and if they are in sync with the rest of
the cluster;
• It can also assign master and slave roles inside MaxScale, allowing Galera clusters to be
used with modules designed for traditional master-slave clusters.
21
Scaling-Out MariaDB Cluster
• Listing servers:
• Listing Monitors
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------------
wbwsrep01 | 192.168.50.11 | 3306 | 0 | Master, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 0 | Slave, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 0 | Slave, Synced, Running
-------------------+-----------------+-------+-------------+--------------------------
MaxScale> list monitors
---------------------+---------------------
Monitor | Status
---------------------+---------------------
Galera Monitor | Running
---------------------+---------------------
22
Scaling-Out MariaDB Cluster
• Galera Monitor (or galeramon)
• Avoid new master election by MaxScale when new server is added to the cluster with
Galera’s monitor parameter: disable_master_failback=true
• Use priority to give MaxScale and galeramon the ability to chose a new master in case
current master is down: use_priority=true
• If the SST method of your cluster is set to xtrabackup-v2 (wsrep_sst_method), this
following parameter is interesting to avoid white flag alerts, as this is keep node’s status
as Synced even being a Donor (DONOR/DESYNCED): available_when_donor=true
23
Scaling-Out MariaDB Cluster
• When using priorities to elect current master:
[root@maxscale ~]# maxadmin -e "list servers"
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 654 | Master, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 76 | Slave, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 89 | Slave, Synced, Running
-------------------+-----------------+-------+-------------+--------------------
[root@maxscale ~]# vim /etc/maxscale.cnf # edited priorities
[root@maxscale ~]# systemctl restart maxscale
[root@maxscale ~]# maxadmin -e "list servers"
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 78 | Slave, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 3 | Slave, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 12 | Master, Synced, Running
-------------------+-----------------+-------+-------------+--------------------
24
Scaling-Out MariaDB Cluster
• When using priorities to elect current master:
#: monitor section
[Galera Monitor]
type=monitor
module=galeramon
servers=wbwsrep01,wbwsrep02,wbwsrep03
disable_master_failback=true
available_when_donor=true
use_priority=true
user=maxmon
passwd=123
#: servers section
[wbwsrep01]
type=server
address=192.168.50.11
port=3306
protocol=MySQLBackend
priority=3
[wbwsrep02]
type=server
address=192.168.50.12
port=3306
protocol=MySQLBackend
priority=2
[wbwsrep03]
type=server
address=192.168.50.13
port=3306
protocol=MySQLBackend
priority=1
25
Scaling-Out MariaDB Cluster
• In case you need to execute a current master’s restart:
#: stop current master
[root@box03 ~]# systemctl stop mariadb
#: set current master in maintenance
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 72 | Slave, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 327 | Master, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 0 | Maintenance, Down
—————————+-----------------+-------+-------------+--------------------
#: new master elected (checking logs - /var/log/maxscale/maxscale1.log)
Server changed state: wbwsrep02[192.168.50.12:3306]: new_master. [Slave, Synced, Running] ->
[Master, Synced, Running]
Server changed state: wbwsrep03[192.168.50.13:3306]: master_down. [Master, Synced, Running] ->
[Down]
26
Scaling-Out MariaDB Cluster
• When former master comes back online:
#: when the former master comes back online, now as a slave due to monitor configs we applied
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 0 | Master, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 0 | Maintenance, Down
-------------------+-----------------+-------+-------------+--------------------
MaxScale> clear server wbwsrep03 maintenance
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 0 | Master, Synced, Master Stickiness, Running
wbwsrep03 | 192.168.50.13 | 3306 | 0 | Slave, Synced, Running
-------------------+-----------------+-------+-------------+--------------------
27
Scaling-Out MariaDB Cluster
• Adding a new galera cluster's node:
• Provision a new node on cluster level and go for the proper settings;
• Raise the new node and make sure it’s part of the PRIMARY component;
• Make sure the new node is in Sync status:
• On MaxScale 2.0 config file:
• Make sure you add the new [servername] entry on servers definition;
• Make sure the Galera Service and the Galera Monitor lists the the servers name;
• Use maxadmin -e “reload configs"
#: tailing the log file after configurations and restart
Server changed state: wbwsrep01[192.168.50.11:3306]: new_slave. [Running] -> [Slave, Synced, Running]
Server changed state: wbwsrep02[192.168.50.12:3306]: new_slave. [Running] -> [Slave, Synced, Running]
Server changed state: wbwsrep03[192.168.50.13:3306]: new_master. [Running] -> [Master, Synced, Running]
Server changed state: wbwsrep04[192.168.50.14:3306]: new_slave. [Running] -> [Slave, Synced, Running]
28
Scaling-Out MariaDB Cluster
• The new scenario we have by now:
#: listing servers again, with the new added one
[root@maxscale ~]# maxadmin -e "list servers"
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running
wbwsrep02 | 192.168.50.12 | 3306 | 0 | Slave, Synced, Running
wbwsrep03 | 192.168.50.13 | 3306 | 0 | Master, Synced, Running
wbwsrep04 | 192.168.50.14 | 3306 | 0 | Slave, Synced, Running
-------------------+-----------------+-------+-------------+--------------------
29
New MaxScale 2.1
30
New MaxScale 2.1
• One of the big new features in 2.1 is the ability to add, remove and alter the server
definitions at runtime when one can starts MaxScale with a minimal configuration:
• After proper configurations to the Monitor, the listener for RWSplit can be created:
• Next step is to define the servers and link then to the monitor and service:
#: add a new monitor, stopped state after creation
maxadmin create monitor cluster-monitor mysqlmon
maxadmin alter monitor cluster-monitor user=maxuser password=maxpwd monitor_interval=1000
maxadmin restart monitor cluster-monitor
#: add the listener, no need of additional configs, started state
maxadmin create listener rwsplit-service rwsplit-listener 0.0.0.0 4006
#: add servers
maxadmin create server db-serv-west 172.0.10.2 3306
maxadmin create server db-serv-east 172.0.10.4 3306
#: link server, monitor and service
maxadmin add server db-serv-west cluster-monitor rwsplit-service
maxadmin add server db-serv-east cluster-monitor rwsplit-service
31
New MaxScale 2.1
• Cache
• The cache will now also be used and populated in a transaction that is not explicitly read
only, but only until the first statement that modifies the database is encountered:
• SELECT statements that refer to user or system variables are not cached;
• SELECT statements using functions whose result depend upon the current user or
context are not cached. Examples of such functions are USER(), RAND() or
CURRENT_TIME().
• Firewall Filter
• Prepared statements are now treated exactly like non-prepared statements.
• Statements can now be accepted/rejected based upon function usage.
32
New MaxScale 2.1
• ProxySQL performs slightly better then MaxScale 2.0 and MaxScale 2.1 performs better
than the both;
Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 33
New MaxScale 2.1
• When connections grows largely, MaxScale 2.1 and ProxySQL are roughly on par;
Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 34
New MaxScale 2.1
• The same here, MaxScale 2.1 and ProxySQL are roughly on par;
Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 35
Thank you
Wagner Bianchi
Principal RDBA
wagner.bianchi@mariadb.com
1 of 36

Recommended

Maxscale 소개 1.1.1 by
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1NeoClova
1.1K views49 slides
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx by
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docxKeepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docxNeoClova
724 views16 slides
binary log と 2PC と Group Commit by
binary log と 2PC と Group Commitbinary log と 2PC と Group Commit
binary log と 2PC と Group CommitTakanori Sejima
4K views20 slides
Maxscale_메뉴얼 by
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼NeoClova
2.1K views21 slides
MySQL Fabricでぼっこぼこにされたはなし by
MySQL FabricでぼっこぼこにされたはなしMySQL Fabricでぼっこぼこにされたはなし
MySQL Fabricでぼっこぼこにされたはなしyoku0825
8.3K views85 slides
サーバーが完膚なきまでに死んでもMySQLのデータを失わないための表技 by
サーバーが完膚なきまでに死んでもMySQLのデータを失わないための表技サーバーが完膚なきまでに死んでもMySQLのデータを失わないための表技
サーバーが完膚なきまでに死んでもMySQLのデータを失わないための表技yoku0825
23.5K views89 slides

More Related Content

What's hot

MariaDB MaxScale monitor 매뉴얼 by
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼NeoClova
1.4K views59 slides
MySQL_MariaDB로의_전환_기술요소-202212.pptx by
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxNeoClova
169 views55 slides
MariaDB 마이그레이션 - 네오클로바 by
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바NeoClova
886 views49 slides
MySQL8.0_performance_schema.pptx by
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
405 views48 slides
iostat await svctm の 見かた、考え方 by
iostat await svctm の 見かた、考え方iostat await svctm の 見かた、考え方
iostat await svctm の 見かた、考え方歩 柴田
17.6K views46 slides
MySQL Administrator 2021 - 네오클로바 by
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
1.5K views238 slides

What's hot(20)

MariaDB MaxScale monitor 매뉴얼 by NeoClova
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼
NeoClova1.4K views
MySQL_MariaDB로의_전환_기술요소-202212.pptx by NeoClova
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
NeoClova169 views
MariaDB 마이그레이션 - 네오클로바 by NeoClova
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바
NeoClova886 views
MySQL8.0_performance_schema.pptx by NeoClova
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
NeoClova405 views
iostat await svctm の 見かた、考え方 by 歩 柴田
iostat await svctm の 見かた、考え方iostat await svctm の 見かた、考え方
iostat await svctm の 見かた、考え方
歩 柴田17.6K views
MySQL Administrator 2021 - 네오클로바 by NeoClova
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
NeoClova1.5K views
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator by Jean-François Gagné
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorAlmost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
MariaDB Galera Cluster by Abdul Manaf
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf1.1K views
MySQLレプリケーションあれやこれや by yoku0825
MySQLレプリケーションあれやこれやMySQLレプリケーションあれやこれや
MySQLレプリケーションあれやこれや
yoku082517.4K views
Galera cluster for high availability by Mydbops
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
Mydbops2.2K views
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK) by Jean-François Gagné
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL 5.7 トラブルシューティング 性能解析入門編 by Mikiya Okuno
MySQL 5.7 トラブルシューティング 性能解析入門編MySQL 5.7 トラブルシューティング 性能解析入門編
MySQL 5.7 トラブルシューティング 性能解析入門編
Mikiya Okuno4.5K views
Histograms in MariaDB, MySQL and PostgreSQL by Sergey Petrunya
Histograms in MariaDB, MySQL and PostgreSQLHistograms in MariaDB, MySQL and PostgreSQL
Histograms in MariaDB, MySQL and PostgreSQL
Sergey Petrunya1.6K views
MySQL/MariaDB Proxy Software Test by I Goo Lee
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
I Goo Lee2K views
MySQL SYSスキーマのご紹介 by Shinya Sugiyama
MySQL SYSスキーマのご紹介MySQL SYSスキーマのご紹介
MySQL SYSスキーマのご紹介
Shinya Sugiyama10.1K views
MySQL 5.7の罠があなたを狙っている by yoku0825
MySQL 5.7の罠があなたを狙っているMySQL 5.7の罠があなたを狙っている
MySQL 5.7の罠があなたを狙っている
yoku0825122.4K views
MySQLバックアップの基本 by yoyamasaki
MySQLバックアップの基本MySQLバックアップの基本
MySQLバックアップの基本
yoyamasaki44.4K views
MySQL GTID Concepts, Implementation and troubleshooting by Mydbops
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
Mydbops2.5K views
Maria db 이중화구성_고민하기 by NeoClova
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
NeoClova3.4K views

Similar to NY Meetup: Scaling MariaDB with Maxscale

Using all of the high availability options in MariaDB by
Using all of the high availability options in MariaDBUsing all of the high availability options in MariaDB
Using all of the high availability options in MariaDBMariaDB plc
2.9K views31 slides
MySQL database replication by
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
52 views9 slides
User Camp High Availability Presentation by
User Camp High Availability PresentationUser Camp High Availability Presentation
User Camp High Availability Presentationsankalita chakraborty
62 views21 slides
ProxySQL for MySQL by
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQLMydbops
4.3K views47 slides
MySQL Replication Evolution -- Confoo Montreal 2017 by
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
612 views56 slides
Getting the most out of MariaDB MaxScale by
Getting the most out of MariaDB MaxScaleGetting the most out of MariaDB MaxScale
Getting the most out of MariaDB MaxScaleMariaDB plc
1.9K views32 slides

Similar to NY Meetup: Scaling MariaDB with Maxscale(20)

Using all of the high availability options in MariaDB by MariaDB plc
Using all of the high availability options in MariaDBUsing all of the high availability options in MariaDB
Using all of the high availability options in MariaDB
MariaDB plc2.9K views
ProxySQL for MySQL by Mydbops
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQL
Mydbops4.3K views
MySQL Replication Evolution -- Confoo Montreal 2017 by Dave Stokes
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
Dave Stokes612 views
Getting the most out of MariaDB MaxScale by MariaDB plc
Getting the most out of MariaDB MaxScaleGetting the most out of MariaDB MaxScale
Getting the most out of MariaDB MaxScale
MariaDB plc1.9K views
ConFoo MySQL Replication Evolution : From Simple to Group Replication by Dave Stokes
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group Replication
Dave Stokes316 views
Deploying MariaDB databases with containers at Nokia Networks by MariaDB plc
Deploying MariaDB databases with containers at Nokia NetworksDeploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia Networks
MariaDB plc2.4K views
Fortify aws aurora_proxy by Marco Tusa
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxy
Marco Tusa105 views
What’s new in Galera 4 by MariaDB plc
What’s new in Galera 4What’s new in Galera 4
What’s new in Galera 4
MariaDB plc6.4K views
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko by Data Con LA
NoSQL on MySQL - MySQL Document Store by Vadim TkachenkoNoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
Data Con LA152 views
Galera Cluster 4 presentation at Percona Live Austin 2019 by Sakari Keskitalo
Galera Cluster 4 presentation at Percona Live Austin 2019 Galera Cluster 4 presentation at Percona Live Austin 2019
Galera Cluster 4 presentation at Percona Live Austin 2019
Sakari Keskitalo2K views
Les fonctionnalites mariadb by lemugfr
Les fonctionnalites mariadbLes fonctionnalites mariadb
Les fonctionnalites mariadb
lemugfr1.1K views
2010 12 mysql_clusteroverview by Dimas Prasetyo
2010 12 mysql_clusteroverview2010 12 mysql_clusteroverview
2010 12 mysql_clusteroverview
Dimas Prasetyo1.1K views
Basic MySQL Troubleshooting for Oracle Database Administrators by Sveta Smirnova
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database Administrators
Sveta Smirnova1.1K views
MySQL 101 PHPTek 2017 by Dave Stokes
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
Dave Stokes551 views
Maria db the new mysql (Colin Charles) by Ontico
Maria db the new mysql (Colin Charles)Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)
Ontico1.7K views
MariaDB 5.5 and what comes next - Percona Live NYC 2012 by Colin Charles
MariaDB 5.5 and what comes next - Percona Live NYC 2012MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012
Colin Charles1.3K views
Percona Cluster with Master_Slave for Disaster Recovery by Ram Gautam
Percona Cluster with Master_Slave for Disaster RecoveryPercona Cluster with Master_Slave for Disaster Recovery
Percona Cluster with Master_Slave for Disaster Recovery
Ram Gautam340 views

More from Wagner Bianchi

Migrations from PLSQL and Transact-SQL - m18 by
Migrations from PLSQL and Transact-SQL - m18Migrations from PLSQL and Transact-SQL - m18
Migrations from PLSQL and Transact-SQL - m18Wagner Bianchi
480 views36 slides
Maxscale switchover, failover, and auto rejoin by
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinWagner Bianchi
1.6K views21 slides
Meetup São Paulo, Maxscale Implementação e Casos de Uso by
Meetup São Paulo, Maxscale Implementação e Casos de UsoMeetup São Paulo, Maxscale Implementação e Casos de Uso
Meetup São Paulo, Maxscale Implementação e Casos de UsoWagner Bianchi
662 views24 slides
Escalando o ambiente com MariaDB Cluster (Portuguese Edition) by
Escalando o ambiente com MariaDB Cluster (Portuguese Edition)Escalando o ambiente com MariaDB Cluster (Portuguese Edition)
Escalando o ambiente com MariaDB Cluster (Portuguese Edition)Wagner Bianchi
1.1K views30 slides
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication by
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWebinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWagner Bianchi
806 views30 slides
MySQL Multi-Source Replication for PL2016 by
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016Wagner Bianchi
1.4K views43 slides

More from Wagner Bianchi(20)

Migrations from PLSQL and Transact-SQL - m18 by Wagner Bianchi
Migrations from PLSQL and Transact-SQL - m18Migrations from PLSQL and Transact-SQL - m18
Migrations from PLSQL and Transact-SQL - m18
Wagner Bianchi480 views
Maxscale switchover, failover, and auto rejoin by Wagner Bianchi
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
Wagner Bianchi1.6K views
Meetup São Paulo, Maxscale Implementação e Casos de Uso by Wagner Bianchi
Meetup São Paulo, Maxscale Implementação e Casos de UsoMeetup São Paulo, Maxscale Implementação e Casos de Uso
Meetup São Paulo, Maxscale Implementação e Casos de Uso
Wagner Bianchi662 views
Escalando o ambiente com MariaDB Cluster (Portuguese Edition) by Wagner Bianchi
Escalando o ambiente com MariaDB Cluster (Portuguese Edition)Escalando o ambiente com MariaDB Cluster (Portuguese Edition)
Escalando o ambiente com MariaDB Cluster (Portuguese Edition)
Wagner Bianchi1.1K views
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication by Wagner Bianchi
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWebinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Wagner Bianchi806 views
MySQL Multi-Source Replication for PL2016 by Wagner Bianchi
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
Wagner Bianchi1.4K views
MySQL 5.7 Multi-Source Replication by Wagner Bianchi
MySQL 5.7 Multi-Source ReplicationMySQL 5.7 Multi-Source Replication
MySQL 5.7 Multi-Source Replication
Wagner Bianchi1.2K views
UNIFAL - MySQL 5.6 - Replicação by Wagner Bianchi
UNIFAL - MySQL 5.6 - ReplicaçãoUNIFAL - MySQL 5.6 - Replicação
UNIFAL - MySQL 5.6 - Replicação
Wagner Bianchi1.2K views
UNIFAL - MySQL Logs - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Logs - 5.0/5.6UNIFAL - MySQL Logs - 5.0/5.6
UNIFAL - MySQL Logs - 5.0/5.6
Wagner Bianchi1.3K views
UNIFAL - MySQL Transações - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Transações - 5.0/5.6UNIFAL - MySQL Transações - 5.0/5.6
UNIFAL - MySQL Transações - 5.0/5.6
Wagner Bianchi3.3K views
UNIFAL - MySQL Storage Engine - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Storage Engine - 5.0/5.6UNIFAL - MySQL Storage Engine - 5.0/5.6
UNIFAL - MySQL Storage Engine - 5.0/5.6
Wagner Bianchi3.4K views
UNIFAL - MySQL Views - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Views - 5.0/5.6UNIFAL - MySQL Views - 5.0/5.6
UNIFAL - MySQL Views - 5.0/5.6
Wagner Bianchi446 views
UNIFAL - MySQL Triggers - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Triggers - 5.0/5.6UNIFAL - MySQL Triggers - 5.0/5.6
UNIFAL - MySQL Triggers - 5.0/5.6
Wagner Bianchi769 views
UNIFAL - MySQL Stored Routines - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Stored Routines - 5.0/5.6UNIFAL - MySQL Stored Routines - 5.0/5.6
UNIFAL - MySQL Stored Routines - 5.0/5.6
Wagner Bianchi759 views
UNIFAL - MySQL Linguagem SQL Básico - 5.0/5.6 by Wagner Bianchi
UNIFAL - MySQL Linguagem SQL Básico - 5.0/5.6UNIFAL - MySQL Linguagem SQL Básico - 5.0/5.6
UNIFAL - MySQL Linguagem SQL Básico - 5.0/5.6
Wagner Bianchi1K views
UNIFAL - MySQL & Vagrant (iniciando os trabalhos) by Wagner Bianchi
UNIFAL - MySQL & Vagrant (iniciando os trabalhos)UNIFAL - MySQL & Vagrant (iniciando os trabalhos)
UNIFAL - MySQL & Vagrant (iniciando os trabalhos)
Wagner Bianchi486 views
Wagner Bianchi, GUOB 2014 MySQL Cluster 7.3 by Wagner Bianchi
Wagner Bianchi, GUOB 2014 MySQL Cluster 7.3Wagner Bianchi, GUOB 2014 MySQL Cluster 7.3
Wagner Bianchi, GUOB 2014 MySQL Cluster 7.3
Wagner Bianchi1.4K views
Introdução ao MySQL 5.6 by Wagner Bianchi
Introdução ao MySQL 5.6Introdução ao MySQL 5.6
Introdução ao MySQL 5.6
Wagner Bianchi3.8K views
InnoDB Plugin - II Fórum da Comunidade MySQL by Wagner Bianchi
InnoDB Plugin - II Fórum da Comunidade MySQLInnoDB Plugin - II Fórum da Comunidade MySQL
InnoDB Plugin - II Fórum da Comunidade MySQL
Wagner Bianchi1.4K views

Recently uploaded

Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Moses Kemibaro
35 views38 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
137 views13 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
225 views19 slides
Business Analyst Series 2023 - Week 4 Session 8 by
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8DianaGray10
145 views13 slides
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOsPriyanka Aash
162 views59 slides
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...ShapeBlue
164 views13 slides

Recently uploaded(20)

Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue137 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10145 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue164 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue108 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue224 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue183 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue162 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue141 views
Optimizing Communication to Optimize Human Behavior - LCBM by Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue152 views
LLMs in Production: Tooling, Process, and Team Structure by Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage57 views

NY Meetup: Scaling MariaDB with Maxscale

  • 1. Scaling Out MariaDB Server w/ MaxScale By Wagner Bianchi Principal RDBA wagner.bianchi@mariadb.com
  • 2. M|17 The Conrad Hotel, NYC April 11 - 12, 2017 m17.mariadb.com Promo code: BIGAPPLE
  • 3. Europe Roadshow
 Locations in May & June Berlin
 May 18 Munich
 May 11 Bonn
 June 30 Amsterdam
 May 23 Paris June 30 Madrid
 May 18 Milan May 11 Details and registration: http://go.mariadb.com/Europe-Roadshow-LP.html More dates and locations will be announced soon!
  • 4. Meetup’s Agenda • With MariaDB Server: • Replication::ReadWriteSplit; • Replication::ConnectionRouting; • Replication::SchemaRouter; • With MariaDB Cluster: • Configuring it as Master/Slave cluster • New features MaxScale 2.1 (coming soon) 4
  • 5. Scalability and, what are we talking about? 5
  • 7. MariaDB Server, Replication::ReadWriteSplit • The readwritesplit router is designed to increase the read-only processing capability of a cluster while maintaining consistency; • This is achieved by splitting the query load into read and write queries; • Read queries, which do not modify data, are spread across multiple nodes while all write queries will be sent to a single node; • This router is designed to be used with a traditional Master-Slave replication cluster; MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- myrocksdb01 | 192.168.50.11 | 3306 | 0 | Master, Running myrocksdb02 | 192.168.50.12 | 3306 | 0 | Slave, Running myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running -------------------+-----------------+-------+-------------+-------------------- 7
  • 8. MariaDB Server, Replication::ReadWriteSplit • The following operations are routed to master: • write statements; • all statements within an open transaction; • stored procedure calls, and user-defined function calls; • DDL statements (DROP|CREATE|ALTER TABLE … etc.); • EXECUTE (prepared) statements; • all statements using temporary tables. 8
  • 9. MariaDB Server, Replication::ReadWriteSplit • Queries which can be routed to slaves must be auto committed and belong to one of the following group: • read-only database queries; • read-only queries to system, or user-defined variables; • SHOW statements, and system function calls. • Slaves can be set as per max_slave_connections as it sets the maximum number of slaves a router session uses at any moment - default is all including master; • One can use router_options to remove current master to the current read pool; 9
  • 10. MariaDB Server, Replication::ReadWriteSplit • router_options • it may include multiple readwritesplit-specific options; • slave_selection_criteria, how requests will be sent to slaves; • LEAST_GLOBAL_CONNECTIONS, the slave with least connections from MariaDB MaxScale • LEAST_ROUTER_CONNECTIONS, the slave with least connections from this service • LEAST_BEHIND_MASTER, the slave with smallest replication lag • LEAST_CURRENT_OPERATIONS (default), the slave with least active operations 10
  • 11. MariaDB Server, Replication::ReadWriteSplit • router_options • master_accept_reads = [true|false] • the is the option that can include or remove master from the reading pool; • master_failure_mode • fail_instantly, when the failure of the master server is detected, the connection will be closed immediately. • fail_on_write, the client connection is closed if a write query is received when no master is available. • error_on_write, If no master is available and a write query is received, an error is returned stating that the connection is in read-only mode. 11
  • 12. MariaDB Server, Replication::ReadWriteSplit [myrocksdb03] type=server address=192.168.50.13 port=3306 protocol=MySQLBackend persistpoolmax=100 persistmaxtime=3600 [CLI] type=service router=cli [CLI Listener] type=listener service=CLI protocol=maxscaled socket=default [Splitter Service] type=service router=readwritesplit servers=myrocksdb01,myrocksdb02,myrocksdb03 router_options=slave_selection_criteria=LEAST _BEHIND_MASTER,master_accept_reads=FALSE,mast er_failure_mode=erro r_on_write max_slave_connections=2 max_slave_replication_lag=30 user=maxuser passwd=YqztlYG… [Splitter Listener] type=listener service=Splitter Service protocol=MySQLClient port=3306 socket=/tmp/myrocksdb_cluster.sock [Replication Monitor] type=monitor module=mysqlmon servers=myrocksdb01,myrocksdb02,myroc ksdb03 detect_replication_lag=1 detect_stale_master=1 user=maxuser passwd=YqztlYG… [myrocksdb01] type=server address=192.168.50.11 port=3306 protocol=MySQLBackend persistpoolmax=100 persistmaxtime=3600 [myrocksdb02] type=server address=192.168.50.12 port=3306 protocol=MySQLBackend persistpoolmax=100 persistmaxtime=3600 12
  • 13. MariaDB Server, Replication::ConnectionRoute Router • The readconnroute router provides simple and lightweight load balancing across a set of servers; • The router can also be configured to balance connections based on a weighting parameter defined in the server's section; • Differs from readwritesplit router as this router needs one port for reads and another one for writes and router_options can be used as well; • One can define a goos strategy here: • point the master directly on the maxscale’s configuration file for writes; • point the slaves for reads, in case a master crash, adjust configuration file and reload; 13
  • 14. MariaDB Server, Replication::ConnectionRoute Router • Let’s consider the following scenario: MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- myrocksdb01 | 192.168.50.11 | 3306 | 0 | Master, Running myrocksdb02 | 192.168.50.12 | 3306 | 0 | Slave, Running myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running -------------------+-----------------+-------+-------------+-------------------- MaxScale> list services Services. --------------------------+----------------------+--------+--------------- Service Name | Router Module | #Users | Total Sessions --------------------------+----------------------+--------+--------------- Write Service | readconnroute | 2 | 2 Read Service | readconnroute | 1 | 1 CLI | cli | 2 | 2 --------------------------+----------------------+--------+--------------- 14
  • 15. MariaDB Server, Replication::ConnectionRoute Router • Let’s shutdown current master: • We do the manual switch on the MariaDB server: • reset slave all; on myrocksdb02; • change master to master_host=‘myrocksdb02’; on myrocksdb03; • On Maxscale, comment server myrocksdb01, remove it form the list of servers on [Replication Monitor] and on Write Service, on the latter, put myrocksdb02; • set server myrocksdb02 master #: stop/crash current master [root@box01 ~]# systemctl stop mariadb #: maxscale logs Server 192.168.50.11:3306 lost the master status. Server changed state: myrocksdb01[192.168.50.11:3306]: master_down. [Master, Running] -> [Down] 15
  • 16. MariaDB Server, Replication::ConnectionRoute Router • After these… #: new scenario [root@maxscale maxscale_config]# maxadmin -e "list servers" Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- myrocksdb01 | 192.168.50.11 | 3306 | 0 | Down myrocksdb02 | 192.168.50.12 | 3306 | 0 | Master, Running myrocksdb03 | 192.168.50.13 | 3306 | 0 | Slave, Running -------------------+-----------------+-------+-------------+-------------------- #: maxscale logs Update server protocol for server 192.168.50.13 to protocol MySQLBackend. Update server protocol for server 192.168.50.12 to protocol MySQLBackend. Update router for service Read Service to readconnroute. Update router for service Write Service to readconnroute. Server changed state: myrocksdb02[192.168.50.12:3306]: new_slave. [Master, Slave, Running] -> [Slave, Running] 16
  • 17. MariaDB Server, Replication::ConnectionRoute Router • Configuration for readconnroute load balancer [Write Service] type=service router=readconnroute router_options=master servers=myrocksdb01 user=maxuser password=123456 [Read Service] type=service router=readconnroute router_options=slave servers=myrocksdb02,myrocksdb03 weightby=serv_weight user=maxuser password=123456 [Write Listener] type=listener service=Write Service protocol=MySQLClient port=33066 socket=/tmp/myrocksdb_readconnroute.sock [Read Listener] type=listener service=Read Service protocol=MySQLClient port=33077 [myrocksdb01] type=server address=192.168.50.11 port=3306 protocol=MySQLBackend [myrocksdb02] type=server address=192.168.50.12 port=3306 protocol=MySQLBackend serv_weight=3 [myrocksdb03] type=server address=192.168.50.13 port=3306 protocol=MySQLBackend serv_weight=2 17
  • 20. Scaling-Out MariaDB Cluster • MaxScale makes your life easier when working with MariaDB Cluster: • Checks on severs roles; • Setup monitors and trigger alerts from nodes status changes; • Transparently configure good practices in read/write split; • Elect new “master" node to receive write traffic; • Add a server under maintenance and clear up its status; • One can use Galera Monitor or the ReadWriteSplit Module for MariaDB Cluster: • Galera Monitor: http://bit.ly/2nshrOk • ReadWriteSplit: http://bit.ly/2oTPXxY 20
  • 21. Scaling-Out MariaDB Cluster • Galera Monitor: • The Galera Monitor is a monitoring module for MaxScale that monitors a Galera cluster; • It detects whether nodes are a part of the cluster and if they are in sync with the rest of the cluster; • It can also assign master and slave roles inside MaxScale, allowing Galera clusters to be used with modules designed for traditional master-slave clusters. 21
  • 22. Scaling-Out MariaDB Cluster • Listing servers: • Listing Monitors MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------------- wbwsrep01 | 192.168.50.11 | 3306 | 0 | Master, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 0 | Slave, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 0 | Slave, Synced, Running -------------------+-----------------+-------+-------------+-------------------------- MaxScale> list monitors ---------------------+--------------------- Monitor | Status ---------------------+--------------------- Galera Monitor | Running ---------------------+--------------------- 22
  • 23. Scaling-Out MariaDB Cluster • Galera Monitor (or galeramon) • Avoid new master election by MaxScale when new server is added to the cluster with Galera’s monitor parameter: disable_master_failback=true • Use priority to give MaxScale and galeramon the ability to chose a new master in case current master is down: use_priority=true • If the SST method of your cluster is set to xtrabackup-v2 (wsrep_sst_method), this following parameter is interesting to avoid white flag alerts, as this is keep node’s status as Synced even being a Donor (DONOR/DESYNCED): available_when_donor=true 23
  • 24. Scaling-Out MariaDB Cluster • When using priorities to elect current master: [root@maxscale ~]# maxadmin -e "list servers" Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 654 | Master, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 76 | Slave, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 89 | Slave, Synced, Running -------------------+-----------------+-------+-------------+-------------------- [root@maxscale ~]# vim /etc/maxscale.cnf # edited priorities [root@maxscale ~]# systemctl restart maxscale [root@maxscale ~]# maxadmin -e "list servers" Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 78 | Slave, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 3 | Slave, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 12 | Master, Synced, Running -------------------+-----------------+-------+-------------+-------------------- 24
  • 25. Scaling-Out MariaDB Cluster • When using priorities to elect current master: #: monitor section [Galera Monitor] type=monitor module=galeramon servers=wbwsrep01,wbwsrep02,wbwsrep03 disable_master_failback=true available_when_donor=true use_priority=true user=maxmon passwd=123 #: servers section [wbwsrep01] type=server address=192.168.50.11 port=3306 protocol=MySQLBackend priority=3 [wbwsrep02] type=server address=192.168.50.12 port=3306 protocol=MySQLBackend priority=2 [wbwsrep03] type=server address=192.168.50.13 port=3306 protocol=MySQLBackend priority=1 25
  • 26. Scaling-Out MariaDB Cluster • In case you need to execute a current master’s restart: #: stop current master [root@box03 ~]# systemctl stop mariadb #: set current master in maintenance MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 72 | Slave, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 327 | Master, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 0 | Maintenance, Down —————————+-----------------+-------+-------------+-------------------- #: new master elected (checking logs - /var/log/maxscale/maxscale1.log) Server changed state: wbwsrep02[192.168.50.12:3306]: new_master. [Slave, Synced, Running] -> [Master, Synced, Running] Server changed state: wbwsrep03[192.168.50.13:3306]: master_down. [Master, Synced, Running] -> [Down] 26
  • 27. Scaling-Out MariaDB Cluster • When former master comes back online: #: when the former master comes back online, now as a slave due to monitor configs we applied MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 0 | Master, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 0 | Maintenance, Down -------------------+-----------------+-------+-------------+-------------------- MaxScale> clear server wbwsrep03 maintenance MaxScale> list servers Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 0 | Master, Synced, Master Stickiness, Running wbwsrep03 | 192.168.50.13 | 3306 | 0 | Slave, Synced, Running -------------------+-----------------+-------+-------------+-------------------- 27
  • 28. Scaling-Out MariaDB Cluster • Adding a new galera cluster's node: • Provision a new node on cluster level and go for the proper settings; • Raise the new node and make sure it’s part of the PRIMARY component; • Make sure the new node is in Sync status: • On MaxScale 2.0 config file: • Make sure you add the new [servername] entry on servers definition; • Make sure the Galera Service and the Galera Monitor lists the the servers name; • Use maxadmin -e “reload configs" #: tailing the log file after configurations and restart Server changed state: wbwsrep01[192.168.50.11:3306]: new_slave. [Running] -> [Slave, Synced, Running] Server changed state: wbwsrep02[192.168.50.12:3306]: new_slave. [Running] -> [Slave, Synced, Running] Server changed state: wbwsrep03[192.168.50.13:3306]: new_master. [Running] -> [Master, Synced, Running] Server changed state: wbwsrep04[192.168.50.14:3306]: new_slave. [Running] -> [Slave, Synced, Running] 28
  • 29. Scaling-Out MariaDB Cluster • The new scenario we have by now: #: listing servers again, with the new added one [root@maxscale ~]# maxadmin -e "list servers" Servers. -------------------+-----------------+-------+-------------+-------------------- Server | Address | Port | Connections | Status -------------------+-----------------+-------+-------------+-------------------- wbwsrep01 | 192.168.50.11 | 3306 | 0 | Slave, Synced, Running wbwsrep02 | 192.168.50.12 | 3306 | 0 | Slave, Synced, Running wbwsrep03 | 192.168.50.13 | 3306 | 0 | Master, Synced, Running wbwsrep04 | 192.168.50.14 | 3306 | 0 | Slave, Synced, Running -------------------+-----------------+-------+-------------+-------------------- 29
  • 31. New MaxScale 2.1 • One of the big new features in 2.1 is the ability to add, remove and alter the server definitions at runtime when one can starts MaxScale with a minimal configuration: • After proper configurations to the Monitor, the listener for RWSplit can be created: • Next step is to define the servers and link then to the monitor and service: #: add a new monitor, stopped state after creation maxadmin create monitor cluster-monitor mysqlmon maxadmin alter monitor cluster-monitor user=maxuser password=maxpwd monitor_interval=1000 maxadmin restart monitor cluster-monitor #: add the listener, no need of additional configs, started state maxadmin create listener rwsplit-service rwsplit-listener 0.0.0.0 4006 #: add servers maxadmin create server db-serv-west 172.0.10.2 3306 maxadmin create server db-serv-east 172.0.10.4 3306 #: link server, monitor and service maxadmin add server db-serv-west cluster-monitor rwsplit-service maxadmin add server db-serv-east cluster-monitor rwsplit-service 31
  • 32. New MaxScale 2.1 • Cache • The cache will now also be used and populated in a transaction that is not explicitly read only, but only until the first statement that modifies the database is encountered: • SELECT statements that refer to user or system variables are not cached; • SELECT statements using functions whose result depend upon the current user or context are not cached. Examples of such functions are USER(), RAND() or CURRENT_TIME(). • Firewall Filter • Prepared statements are now treated exactly like non-prepared statements. • Statements can now be accepted/rejected based upon function usage. 32
  • 33. New MaxScale 2.1 • ProxySQL performs slightly better then MaxScale 2.0 and MaxScale 2.1 performs better than the both; Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 33
  • 34. New MaxScale 2.1 • When connections grows largely, MaxScale 2.1 and ProxySQL are roughly on par; Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 34
  • 35. New MaxScale 2.1 • The same here, MaxScale 2.1 and ProxySQL are roughly on par; Source: https://mariadb.com/resources/blog/improving-performance-mariadb-maxscale 35
  • 36. Thank you Wagner Bianchi Principal RDBA wagner.bianchi@mariadb.com