MariaDB MaxScale
Maria Luisa Raviol
Senior Sales Engineer- MariaDB
SERVER
Enterprise-grade secure,
highly available and scalable
relational database with
a modern, extensible
architecture
MAXSCALE COLUMNSTORE
Next-generation database
proxy that manages security,
scalability and high
availability in scale-out
deployments
Columnar storage engine
for massively parallel
distributed query execution
and data loading
MariaDB Technology
3
MariaDB MaxScale
Latest GA
Version 2.1
Part of MariaDB
TX and AX
Offering
Next Generation
Database Proxy for
SCALABILITY
SECURITY
HIGH AVAILABILITY
DATA STREAMING
MariaDB MaxScale Concept
DATABASE
SERVERS
MASTER
SLAVES
Binlog Cache
Insulates client applications
from the complexities
of backend database cluster
Simplify replication
from database
to other databases
CLIENT
PROTOCOL SUPPORT
AUTHENTICATION
DATABASE MONITORING
LOAD BALANCING & ROUTING
QUERY TRANSFORMATION & LOGGING
Flexible, easy to
write plug-ins for
Generic Core
MULTI-THREADED
E-POLL BASED
STATELESS
SHARES THE THREAD POOL
Scalability
Transaction Scaling to support user growth
and simplify applications
Connection Rate Limitation
Query Cache
LOAD BALANCING TO
MARIADB MASTER/SLAVE
MARIADB GALERA CLUSTER
AURORA CLUSTER
Replication Scaling to support web-scale
applications’ user base
BINLOG SERVER FOR HORIZONTAL SCALING OF SLAVES
IN MASTER/SLAVE ARCHITECTURE
Multi-tenant database scaling to transparently
grow tenants and data volume SCHEMA SHARDING
HANDLE LARGE AMOUNT OF READ OPERATIONS WITH
HIGH PERFORMANCE
Routing based on
QUERY TYPES
QUERY PATTERNS
DATABASE SERVER STATE
REPLICATION LAGS
Load balancing across database clusters
MARIADB MASTER/SLAVE
MARIADB GALERA
MARIADB MULTI-MASTER
AWS AURORA
Scaling
Scale database environment without
application impact
Minimize maintenance downtime
Connection Based Routing
readwrite
MASTER SLAVES
read write
Statement Based Routing (Read-
Write Split)
readwrite
MASTER SLAVES
read &
write
Read/Write Splitting
MariaDB Replication + R/W Split Routing
Each application server uses
only 1 connection
MaxScale monitors the state of each node
and only applies operations on available
slaves
MaxScale creates 2 connections, one for
R/W on the master node and one for
R/O load balanced on the slave nodes
Max
Scale
R/W
Splitting
Scaling: Tunability
Route all reads to master subsequent to a write for a configurable amount of time or number
of operations
Route queries to only those slave that are less than configurable
replication lag behind master
Route all queries that match a pattern(regex) to specific servers
Weighted routing
Scaling: Multi-tenant Database
Each tenant with its own schema
Multi-tenant database hosting
Without impacting existing user base
Scale the database with user base and data volume
growth
Multi-tenant Database Routing
(Schema Sharding)
shard n...shard 2shard 1
Scaling: Binlog Replication
Large scale Master/Slave Replication Clusters
Transparent MariaDB binlog replication relay
Horizontally Scale Slaves without Master Overload
SLAVES
MASTER
SLAVES
Binlog Cache
Binlog Cache
Query Cache
in memory
LRU cache.
Clients
Database Servers
Query Cache Filter
CACHE QUERY RESULTS IN MAXSCALE
FOR CONFIGURABLE TIMEOUT
FOR CACHED QUERIES RETURN
RESULTS FROM CACHE
Handle large amount of read operations
with high performance
Operational Use Cases
Dynamically configure server, listener, monitor
Dynamically configure database firewall rules
Query Duplication
Query Cache
DUPLICATE QUERY BETWEEN PRODUCTION AND STAGING FOR
UPGRADE VERIFICATION
DUPLICATE QUERY BETWEEN DATABASE AND EXTERNAL
APPLICATIONS FOR QUERY ANALYTICS
Query logging CLUSTER WIDER QUERY TUNING
Query translation TRANSLATE QUERIES SYNTAX FROM ONE PROTOCOL TO ANOTHER
ASYNCHRONOUSLY UPGRADE APPLICATIONS AND DATABASE
INVOKE EXTERNAL OPERATIONAL TOOLS FOR SERVER DOWN/UP
EVENT MANAGEMENT
MANAGE FAILOVER - PROMOTE SLAVE TO MASTER UPON FAILURE
Binlog conversion to Avro
Streaming of Change Data Capture
events (binlog) to big data environments
Data Streaming
Change Data Capture
Clients
EMR
MariaDB
ColumnStore
Big Data Platforms
AVRO or
JSON
events
Streaming
MariaDB
Master
Binlog to AVRO
conversion
Install MariaDB MaxScale
How to set up
MariaDB MaxScale
Directions here for reference:
https://mariadb.com/kb/en/mariadb-
enterprise/setting-up-mariadb-maxscale/
Install the package
relevant to your
distribution
Step 1
Create the required users
in your MariaDB
Replication or MariaDB cluster
Step 2
Create a MariaDB
MaxScale
configuration file
Step 3
Future
MariaDB 10.2 Support
Cross Data Center HA enablement
PAMD Authentication
More performance enhancements
Additional protocols
Tighter integration with MariaDB ColumnStore
Learn more
Download
https://mariadb.com/downloads/mariadb-tx/maxscale
Documentation
https://mariadb.com/kb/en/mariadb-enterprise/maxscale/
Blogs
https://mariadb.com/blog-tags/maxscale
Product Page
https://mariadb.com/products/technology/maxscale
Webinars
https://mariadb.com/resources/webinars?combine=MaxScale
Thank you

How to Manage Scale-Out Environments with MariaDB MaxScale

  • 1.
    MariaDB MaxScale Maria LuisaRaviol Senior Sales Engineer- MariaDB
  • 2.
    SERVER Enterprise-grade secure, highly availableand scalable relational database with a modern, extensible architecture MAXSCALE COLUMNSTORE Next-generation database proxy that manages security, scalability and high availability in scale-out deployments Columnar storage engine for massively parallel distributed query execution and data loading MariaDB Technology
  • 3.
    3 MariaDB MaxScale Latest GA Version2.1 Part of MariaDB TX and AX Offering Next Generation Database Proxy for SCALABILITY SECURITY HIGH AVAILABILITY DATA STREAMING
  • 4.
    MariaDB MaxScale Concept DATABASE SERVERS MASTER SLAVES BinlogCache Insulates client applications from the complexities of backend database cluster Simplify replication from database to other databases CLIENT PROTOCOL SUPPORT AUTHENTICATION DATABASE MONITORING LOAD BALANCING & ROUTING QUERY TRANSFORMATION & LOGGING Flexible, easy to write plug-ins for Generic Core MULTI-THREADED E-POLL BASED STATELESS SHARES THE THREAD POOL
  • 5.
    Scalability Transaction Scaling tosupport user growth and simplify applications Connection Rate Limitation Query Cache LOAD BALANCING TO MARIADB MASTER/SLAVE MARIADB GALERA CLUSTER AURORA CLUSTER Replication Scaling to support web-scale applications’ user base BINLOG SERVER FOR HORIZONTAL SCALING OF SLAVES IN MASTER/SLAVE ARCHITECTURE Multi-tenant database scaling to transparently grow tenants and data volume SCHEMA SHARDING HANDLE LARGE AMOUNT OF READ OPERATIONS WITH HIGH PERFORMANCE
  • 6.
    Routing based on QUERYTYPES QUERY PATTERNS DATABASE SERVER STATE REPLICATION LAGS Load balancing across database clusters MARIADB MASTER/SLAVE MARIADB GALERA MARIADB MULTI-MASTER AWS AURORA Scaling Scale database environment without application impact Minimize maintenance downtime Connection Based Routing readwrite MASTER SLAVES read write Statement Based Routing (Read- Write Split) readwrite MASTER SLAVES read & write
  • 7.
    Read/Write Splitting MariaDB Replication+ R/W Split Routing Each application server uses only 1 connection MaxScale monitors the state of each node and only applies operations on available slaves MaxScale creates 2 connections, one for R/W on the master node and one for R/O load balanced on the slave nodes Max Scale R/W Splitting
  • 8.
    Scaling: Tunability Route allreads to master subsequent to a write for a configurable amount of time or number of operations Route queries to only those slave that are less than configurable replication lag behind master Route all queries that match a pattern(regex) to specific servers Weighted routing
  • 9.
    Scaling: Multi-tenant Database Eachtenant with its own schema Multi-tenant database hosting Without impacting existing user base Scale the database with user base and data volume growth Multi-tenant Database Routing (Schema Sharding) shard n...shard 2shard 1
  • 10.
    Scaling: Binlog Replication Largescale Master/Slave Replication Clusters Transparent MariaDB binlog replication relay Horizontally Scale Slaves without Master Overload SLAVES MASTER SLAVES Binlog Cache Binlog Cache
  • 11.
    Query Cache in memory LRUcache. Clients Database Servers Query Cache Filter CACHE QUERY RESULTS IN MAXSCALE FOR CONFIGURABLE TIMEOUT FOR CACHED QUERIES RETURN RESULTS FROM CACHE Handle large amount of read operations with high performance
  • 12.
    Operational Use Cases Dynamicallyconfigure server, listener, monitor Dynamically configure database firewall rules Query Duplication Query Cache DUPLICATE QUERY BETWEEN PRODUCTION AND STAGING FOR UPGRADE VERIFICATION DUPLICATE QUERY BETWEEN DATABASE AND EXTERNAL APPLICATIONS FOR QUERY ANALYTICS Query logging CLUSTER WIDER QUERY TUNING Query translation TRANSLATE QUERIES SYNTAX FROM ONE PROTOCOL TO ANOTHER ASYNCHRONOUSLY UPGRADE APPLICATIONS AND DATABASE INVOKE EXTERNAL OPERATIONAL TOOLS FOR SERVER DOWN/UP EVENT MANAGEMENT MANAGE FAILOVER - PROMOTE SLAVE TO MASTER UPON FAILURE
  • 13.
    Binlog conversion toAvro Streaming of Change Data Capture events (binlog) to big data environments Data Streaming Change Data Capture Clients EMR MariaDB ColumnStore Big Data Platforms AVRO or JSON events Streaming MariaDB Master Binlog to AVRO conversion
  • 14.
    Install MariaDB MaxScale Howto set up MariaDB MaxScale Directions here for reference: https://mariadb.com/kb/en/mariadb- enterprise/setting-up-mariadb-maxscale/ Install the package relevant to your distribution Step 1 Create the required users in your MariaDB Replication or MariaDB cluster Step 2 Create a MariaDB MaxScale configuration file Step 3
  • 15.
    Future MariaDB 10.2 Support CrossData Center HA enablement PAMD Authentication More performance enhancements Additional protocols Tighter integration with MariaDB ColumnStore
  • 16.
  • 17.