MaxScale
The Pluggable Router
Massimiliano Pinto
Vilho Raatikka
© SkySQL Ab 2014
MaxScale Objectives
• Highly scalable 
• Transparent to the application
• Highly available
• Extendible
• Flexible
• Modul...
How? In a nutshell
Client authenticates once
- with MaxScale

Allows multiple protocols for
clients and servers

Configurat...
Typical Scenarios
•

MaxScale

MySQL Replication with

‣ Read connection load balancing
‣ Read/Write statement splitting
D...
MySQL Replication with R/W split
Each application uses
only 1 connection

For applications that have been designed
to work...
Galera Cluster using
Connection Load Balancing
For applications that can use
the“all-master” capabilities of
Galera

Each ...
Inside MaxScale

MySQL Local Authentication
Users are loaded at
start

connect/auth

“read user info”

Backends

© SkySQL ...
Inside MaxScale

MySQL Local Authentication
Users are loaded at
start

“read user info”

ok

Backends

© SkySQL Ab 2014

7
Inside MaxScale

Basic Read Load Balancing
“select * from T1”
Slaves

select a
candidate server
© SkySQL Ab 2014

8
Inside MaxScale
Read/Write Splitting
Master
“call my_proc(1)”
Slaves

!

Call parser and
examine parse tree

Query
Classifi...
Extending with filters
Pr
ot
h
oc
t
ol
Au
MaxScale

Mon
itor

P
P
Pr
ro
ro
ot
to
to
oc
co
co
olll

r
r
r
Filte
Fiillte
F t...
Extending with filters
Pr
ot
h
oc
t
ol
Au
MaxScale

Protocol

Filter

Mon
itor

Pr
ot
oc
ol

r

Filte

Router

Routing Hin...
Extending with filters

Router

Protocol

Filter

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

Routing Hint

Router

F...
Extending with filters

Router

Protocol

Filter

INSERT INTO T1 (....)

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

...
Extending with filters

Router

Protocol

Filter
INSERT INTO T1 (....)

Log Entry

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
...
Extending with filters

Router

Protocol

Filter

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

Routing Hint

Router

F...
Extending with filters

Router

Protocol

Filter

Router

Filter
INSERT INTO T1 (....)
INSERT INTO DWH.T1 (....)

Log Entr...
Extending with filters

Router

Protocol

Filter

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

Router

Filter

Protoco...
Extending with filters

Router

Protocol

Filter

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

Router

Filter

Protoco...
Extending with filters

Router

Protocol

Filter

Mon
itor

r

Filte

Pr
ot
h
oc
t
ol
Au
MaxScale

Router

Filter

Protoco...
Get involved
•
•
•
•
•
•

Check on GitHub

https://github.com/skysql/MaxScale!

MariaDB Source

https://downloads.mariadb....
Upcoming SlideShare
Loading in...5
×

MaxScale - the pluggable router

3,337

Published on

MaxScale presentation at FOSDEM 2014

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,337
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "MaxScale - the pluggable router"

  1. 1. MaxScale The Pluggable Router Massimiliano Pinto Vilho Raatikka © SkySQL Ab 2014
  2. 2. MaxScale Objectives • Highly scalable • Transparent to the application • Highly available • Extendible • Flexible • Modules specify what MaxScale is : router / firewall / data extract tool /… • Open source, GPL2 software since 8th of Jan. 2014 © SkySQL Ab 2014 2
  3. 3. How? In a nutshell Client authenticates once - with MaxScale Allows multiple protocols for clients and servers Configuration and state aware monitors Alter, block or log client requests and results Content-aware or unaware routers Core of MaxScale is multi-threaded, event-driven network IO processor © SkySQL Ab 2014 3
  4. 4. Typical Scenarios • MaxScale MySQL Replication with ‣ Read connection load balancing ‣ Read/Write statement splitting Database • Database Database Database Database Galera Cluster ‣ Connection load balancing and conflict avoidance © SkySQL Ab 2014 4
  5. 5. MySQL Replication with R/W split Each application uses only 1 connection For applications that have been designed to work with a single server and require read scalability MaxScale MaxScale monitors the state of each node and selects only available nodes MaxScale creates 2 connections, one for R/W on the Master node and one R/O load balanced on the Slave nodes Database © SkySQL Ab 2014 Database Database Database Database
  6. 6. Galera Cluster using Connection Load Balancing For applications that can use the“all-master” capabilities of Galera Each application uses only 1 connection MaxScale MaxScale monitors the state of each Galera Cluster node and selects only synced nodes MaxScale load balances the client connections and whenever possible writes to one node avoiding conflicts © SkySQL Ab 2014 Database Database Database
  7. 7. Inside MaxScale MySQL Local Authentication Users are loaded at start connect/auth “read user info” Backends © SkySQL Ab 2014 7
  8. 8. Inside MaxScale MySQL Local Authentication Users are loaded at start “read user info” ok Backends © SkySQL Ab 2014 7
  9. 9. Inside MaxScale Basic Read Load Balancing “select * from T1” Slaves select a candidate server © SkySQL Ab 2014 8
  10. 10. Inside MaxScale Read/Write Splitting Master “call my_proc(1)” Slaves ! Call parser and examine parse tree Query Classifier © SkySQL Ab 2014 9
  11. 11. Extending with filters Pr ot h oc t ol Au MaxScale Mon itor P P Pr ro ro ot to to oc co co olll r r r Filte Fiillte F te Router • May be connected to form arbitrary chains Routing Hint • Allows inspection, modification and rejection of requests and results ‣ ‣ blacklist INSERT INTO DWH.T1 (....) Log Entry data mining / log © SkySQL Ab 2014 10
  12. 12. Extending with filters Pr ot h oc t ol Au MaxScale Protocol Filter Mon itor Pr ot oc ol r Filte Router Routing Hint Filter Router Protocol INSERT INTO DWH.T1 (....) Log Entry © SkySQL Ab 2014 10
  13. 13. Extending with filters Router Protocol Filter Mon itor r Filte Pr ot h oc t ol Au MaxScale Routing Hint Router Filter Protocol INSERT INTO DWH.T1 (....) Log Entry Router © SkySQL Ab 2014 Protocol 10
  14. 14. Extending with filters Router Protocol Filter INSERT INTO T1 (....) Mon itor r Filte Pr ot h oc t ol Au MaxScale Routing Hint Router Filter Protocol INSERT INTO DWH.T1 (....) Log Entry Router © SkySQL Ab 2014 Protocol 10
  15. 15. Extending with filters Router Protocol Filter INSERT INTO T1 (....) Log Entry Mon itor r Filte Pr ot h oc t ol Au MaxScale Routing Hint Router Filter Protocol INSERT INTO DWH.T1 (....) Router © SkySQL Ab 2014 Protocol 10
  16. 16. Extending with filters Router Protocol Filter Mon itor r Filte Pr ot h oc t ol Au MaxScale Routing Hint Router Filter Protocol INSERT INTO T1 (....) INSERT INTO DWH.T1 (....) Log Entry Router © SkySQL Ab 2014 Protocol 10
  17. 17. Extending with filters Router Protocol Filter Router Filter INSERT INTO T1 (....) INSERT INTO DWH.T1 (....) Log Entry Mon itor r Filte Pr ot h oc t ol Au MaxScale Protocol Routing Hint Router © SkySQL Ab 2014 Protocol 10
  18. 18. Extending with filters Router Protocol Filter Mon itor r Filte Pr ot h oc t ol Au MaxScale Router Filter Protocol INSERT INTO T1 (....) Routing Hint INSERT INTO DWH.T1 (....) Log Entry Router © SkySQL Ab 2014 Protocol 10
  19. 19. Extending with filters Router Protocol Filter Mon itor r Filte Pr ot h oc t ol Au MaxScale Router Filter Protocol INSERT INTO T1 (....) Routing Hint Log Entry Router Protocol INSERT INTO DWH.T1 (....) © SkySQL Ab 2014 10
  20. 20. Extending with filters Router Protocol Filter Mon itor r Filte Pr ot h oc t ol Au MaxScale Router Filter Protocol INSERT INTO T1 (....) Routing Hint Log Entry Router Protocol INSERT INTO DWH.T1 (....) © SkySQL Ab 2014 10
  21. 21. Get involved • • • • • • Check on GitHub https://github.com/skysql/MaxScale! MariaDB Source https://downloads.mariadb.org/! Bugs report!! ! ! http://bugs.skysql.com/buglist.cgi?product=Maxscale ! Google groups https://groups.google.com/forum/#!forum/maxscale! Binary Tarball http://downloads.skysql.com/files/SkySQL/MaxScale! SkySQL website http://www.skysql.com Thank you ! © SkySQL Ab 2014 11

×