© SkySQL Corporation Ab. Company Confidential.
MaxScale – The Pluggable Router
Serge Frezefond,
Cloud Solution Architect, ...
© SkySQL Corporation Ab. Company Confidential.
MaxScale Objectives
• Highly scalable
• Transparent to the application
• Hi...
© SkySQL Corporation Ab. Company Confidential.
How? In a nut shell
Core of MaxScale is multi-threaded, event-driven networ...
© MariaDB. Company Confidential.
Read Scalability with MySQL Replication
using MaxScale’s Connection Load Balancing
Client...
© MariaDB. Company Confidential.
Consistent Read Scalability with Galera
using MaxScale’s Read/Write Split Router
ClientCl...
© MariaDB. Company Confidential.
Query rewrite and filtering
by using MaxScale’s filters
ClientClient Client
For applicati...
© MariaDB. Company Confidential.
Query rewrite and filtering (cont.)
by using MaxScale’s filters
ClientClient Client
For s...
© MariaDB. Company Confidential.
MaxScale 0.7
● Galera support
○ Read/Write Split router for Galera Cluster
● Multiple sla...
© MariaDB. Company Confidential.
Basic Setup
● Clients access MaxScale
● MaxScale in the app server,
UNIX sockets
● Databa...
© MariaDB. Company Confidential.
Typical Scenarios
● MySQL Replication with
● Read connection load
balancing
● Read/Write ...
© MariaDB. Company Confidential.
Inside MaxScale
MySQL Local Authentication
Backends Clients
ok
“read user, host” connect/...
© MariaDB. Company Confidential.
Inside MaxScale
Read/write splitting
“call my_proc(1)”
Master
Slave
Query Classifier
© MariaDB. Company Confidential.
Inside MaxScale Routing
© MariaDB. Company Confidential.
Inside MaxScale Routing
© MariaDB. Company Confidential.
What’s new in R/W split router
● Session Commands
● Local variables, User change,
SET aut...
© MariaDB. Company Confidential.
What’s coming
● Filters
● Routing hints
● Multiple Slave Support
● Weight based routing
●...
© MariaDB. Company Confidential.
Extending with filters
● May be connected to form arbitrary chains
● Allows inspection, m...
© MariaDB. Company Confidential.
Get involved
● Check on GitHub https://github.com/skysql/MaxScale
● MariaDB Source https:...
© MariaDB. Company Confidential.
MaxScale - Thank you!
Upcoming SlideShare
Loading in...5
×

MaxScale - The Pluggibale Router MariaDB Roadshow 2014 Paris

376

Published on

MaxScale - The Pluggable Router by Serge Frezefond.

Presented 26.6.2014 at the MariaDB Roadshow in Paris, France.

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

No Downloads
Views
Total Views
376
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

MaxScale - The Pluggibale Router MariaDB Roadshow 2014 Paris

  1. 1. © SkySQL Corporation Ab. Company Confidential. MaxScale – The Pluggable Router Serge Frezefond, Cloud Solution Architect, SkySQL
  2. 2. © SkySQL Corporation Ab. Company Confidential. 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
  3. 3. © SkySQL Corporation Ab. Company Confidential. How? In a nut shell Core of MaxScale is multi-threaded, event-driven network IO processor 10/06/2014 Client authenticates once - with MaxScale Alter, block or log client requests and results Content-aware or unaware routers Configuration and state aware monitors Allows multiple protocols for clients and servers
  4. 4. © MariaDB. Company Confidential. Read Scalability with MySQL Replication using MaxScale’s Connection Load Balancing ClientClient Client For applications that need read scalability and load balancing and can use separate connections for reads and writes. Each client establishes one connection for writes and one for reads Master Slave Slave [write service] type=service router=readconnroute router_options=master servers=s1,s2,s3,..,sn [read service] type=service router=readconnroute router_options=slave servers=s1,s2,s3,..,sn Slave Slave ...
  5. 5. © MariaDB. Company Confidential. Consistent Read Scalability with Galera using MaxScale’s Read/Write Split Router ClientClient Client For applications that require read scalability with consistent reads and High Availability with fast failovers. MaxScale selects one as a master and one or more cluster members to slave(s) If node fails a new master can be chosen immediately.
  6. 6. © MariaDB. Company Confidential. Query rewrite and filtering by using MaxScale’s filters ClientClient Client For applications with multiple different backend databases. For database firewalling, etc. CREATE TABLE SUPPLIER(ID INTEGER, NAME VARCHAR) TYPE=INNODB [regex] type=filter module=regexfilter match=TYPE replace=ENGINE CREATE TABLE SUPPLIER(ID INTEGER, NAME VARCHAR) ENGINE=INNODB
  7. 7. © MariaDB. Company Confidential. Query rewrite and filtering (cont.) by using MaxScale’s filters ClientClient Client For sloppy administrators :-) Select count(*) f0rm mysql.user [regex] type=filter module=regexfilter match=[Ff][Oo0][Rr][Mm] replace=FROM Select count(*) FROM mysql.user
  8. 8. © MariaDB. Company Confidential. MaxScale 0.7 ● Galera support ○ Read/Write Split router for Galera Cluster ● Multiple slaves support ○ Read/Write Split router allows multiple slave connections and balancing load between them ● Debug Interface enhancements ○ Support for wide variety of MaxScale objects which can be referenced by their names instead of memory addresses ○ User mode to prevent access by using memory addresses ● Maintenance mode for servers ● Configurable monitoring interval ● Replication Lag Heartbeat Monitor ● Filters API ● MariaDB 10 Replication support in MySQL monitor Release notes: https://github.com/skysql/MaxScale/blob/release- 0.7/Documentation/Debug%20And%20Diagnostic%20Support.pdf
  9. 9. © MariaDB. Company Confidential. Basic Setup ● Clients access MaxScale ● MaxScale in the app server, UNIX sockets ● Database servers accessed via TCP ● Clients ● Application Server Database Cluster
  10. 10. © MariaDB. Company Confidential. Typical Scenarios ● MySQL Replication with ● Read connection load balancing ● Read/Write statement splitting ● Galera Cluster ● Connection load balancing ● Read/Write statement splitting ● Write conflict avoidance (planned)
  11. 11. © MariaDB. Company Confidential. Inside MaxScale MySQL Local Authentication Backends Clients ok “read user, host” connect/auth Users are loaded at start
  12. 12. © MariaDB. Company Confidential. Inside MaxScale Read/write splitting “call my_proc(1)” Master Slave Query Classifier
  13. 13. © MariaDB. Company Confidential. Inside MaxScale Routing
  14. 14. © MariaDB. Company Confidential. Inside MaxScale Routing
  15. 15. © MariaDB. Company Confidential. What’s new in R/W split router ● Session Commands ● Local variables, User change, SET auto commit ● Execute in master & slave but maintain execution order ● Current limitation : queries not supported in session commands SET @a=(SELECT COUNT(*) FROM mysql.user) is executed in both nodes. ● Galera H/A Support ● Fault Tolerance ● Replication consistency ● Transaction support ● Within active transaction everything is routed to master ● Detection of implicit BEGIN and ROLLBACK/COMMIT
  16. 16. © MariaDB. Company Confidential. What’s coming ● Filters ● Routing hints ● Multiple Slave Support ● Weight based routing ● Backend failure tolerance ● Enforce Node Replication consistency for MariaDB 10 & MySQL 5.6
  17. 17. © MariaDB. Company Confidential. Extending with filters ● May be connected to form arbitrary chains ● Allows inspection, modification and rejection of requests and results ● blacklist ● data mining / log
  18. 18. © MariaDB. Company Confidential. 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
  19. 19. © MariaDB. Company Confidential. MaxScale - Thank you!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×