Skalierbarkeit mit MariaDB
und MaxScale
MariaDB Roadshow 2014
Hamburg - Berlin - Frankfurt
Ralf Gebhardt, Sales Engineer
r...
© SkySQL – The MariaDB Company
MaxScale Objectives
• Highly scalable
• Transparent to the application
• Highly available
•...
© SkySQL – The MariaDB Company
How? In a nut shell
Core of MaxScale is multi-threaded, event-driven network IO processor
1...
© SkySQL – The MariaDB Company
MaxScale 1.0 beta
● Announced 7th of July
● First Beta Release
● Connection Routing
● Maste...
© SkySQL – The MariaDB Company
Basic Setup
● Clients access MaxScale
● MaxScale in the app server,
UNIX sockets
● Database...
© SkySQL – The MariaDB Company
Typical Scenarios
● MySQL Replication with
● Read connection load
balancing
● Read/Write st...
© SkySQL – The MariaDB Company
Inside MaxScale
MySQL Local Authentication
Backends Clients
ok
“read user, host” connect/au...
© SkySQL – The MariaDB Company
Inside MaxScale
Read/write splitting
“call my_proc(1)”
Master
Slave
Query Classifier
© SkySQL – The MariaDB Company
Inside MaxScale Routing
© SkySQL – The MariaDB Company
Inside MaxScale Routing
© SkySQL – The MariaDB Company
Read Connection Routing - Replication
● For applications that are “Replication
aware”, i.e....
© SkySQL – The MariaDB Company
Read Scalability with MySQL Replication
Using MaxScale’s Connection Load Balancing
ClientCl...
© SkySQL – The MariaDB Company
Connection Routing - Galera
● For applications that can use the“all-
master” capabilities o...
© SkySQL – The MariaDB Company
Read/Write Splitting - Replication
● For applications that have been designed
to work with ...
© SkySQL – The MariaDB Company
Read/Write Splitting - Galera
● For applications designed to work with a
single database se...
© SkySQL – The MariaDB Company
Query Monitor
● For developers and devops who need to
monitor/troubleshoot their applicatio...
© SkySQL – The MariaDB Company
Query Transformation
● For applications that cannot be
modified, but queries must be evalua...
© SkySQL – The MariaDB Company
Query Rewrite and Filtering
Using MaxScale’s Filters
ClientClient Client
For applications w...
© SkySQL – The MariaDB Company
Query rewrite and filtering (cont.)
Using MaxScale’s Filters
ClientClient Client
For sloppy...
© SkySQL – The MariaDB Company
What’s coming
● Filters
● Routing hints
● Multiple Slave Support
● Weight based routing
● B...
© SkySQL – The MariaDB Company
Extending with filters
● May be connected to form arbitrary chains
● Allows inspection, mod...
© SkySQL – The MariaDB Company
Get involved
● Check on GitHub
● https://github.com/skysql/MaxScale
● MariaDB Source
● http...
Fragen?
www.mariadb.com
www.facebook.com/mariadb.dbms
www.twitter.com/mariadb
Vielen Dank!
Skalierbarkeit mit MariaDB
und ...
Upcoming SlideShare
Loading in...5
×

Skalierbarkeit mit MariaDB und MaxScale - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt

552

Published on

Skalierbarkeit mit MariaDB und MaxScale

Presented by Ralf Gebhardt at the MariaDB Roadshow Germany: 4.7.2014 in Hamburg, 8.7.2014 in Berlin and 11.7.2014 in Frankfurt.

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

No Downloads
Views
Total Views
552
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Skalierbarkeit mit MariaDB und MaxScale - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt

  1. 1. Skalierbarkeit mit MariaDB und MaxScale MariaDB Roadshow 2014 Hamburg - Berlin - Frankfurt Ralf Gebhardt, Sales Engineer ralf.gebhardt@skysql.com
  2. 2. © SkySQL – The MariaDB Company 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 – The MariaDB Company 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. © SkySQL – The MariaDB Company MaxScale 1.0 beta ● Announced 7th of July ● First Beta Release ● Connection Routing ● Master, Slave, Synced ● Read/Write Splitter ● Statement based routing ● Balance Load on Slaves ● Monitor for Replication and Galera ● Filter ● Query Logging ● RegEx Match/Replace ● Tee – Second Service ● Top – Per Connection Long Query logging ● Protocols ● MySQL Client, MySQL Backend ● Telnet ● HTTPD
  5. 5. © SkySQL – The MariaDB Company Basic Setup ● Clients access MaxScale ● MaxScale in the app server, UNIX sockets ● Database servers accessed via TCP ● Clients ● Application Server Database Cluster
  6. 6. © SkySQL – The MariaDB Company 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)
  7. 7. © SkySQL – The MariaDB Company Inside MaxScale MySQL Local Authentication Backends Clients ok “read user, host” connect/auth Users are loaded at start
  8. 8. © SkySQL – The MariaDB Company Inside MaxScale Read/write splitting “call my_proc(1)” Master Slave Query Classifier
  9. 9. © SkySQL – The MariaDB Company Inside MaxScale Routing
  10. 10. © SkySQL – The MariaDB Company Inside MaxScale Routing
  11. 11. © SkySQL – The MariaDB Company Read Connection Routing - Replication ● For applications that are “Replication aware”, i.e. they can use 2 connections, one for the master and one for the slave servers ● Each application server uses 2 or more connections: 1 R/W, 1+ R/O ● Connection load balancing is fast, lightweight and it provides high availability ● MaxScale connects the R/W client connection to the master and it load balances the R/O client connection to one of the slaves ● MHA may provide the automatic failover in case of fault of the master
  12. 12. © SkySQL – The MariaDB Company 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 ...
  13. 13. © SkySQL – The MariaDB Company Connection Routing - Galera ● For applications that can use the“all- master” capabilities of Galera ● Each application server uses only 1 connection ● MaxScale monitors the state of each Galera Cluster and it applies load balancing only on synced nodes ● MaxScale load balances the client connections to the Galera nodes
  14. 14. © SkySQL – The MariaDB Company Read/Write Splitting - Replication ● For applications that have been designed to work with a single server and require read scalability ● Each application server uses only 1 connection ● MaxScale monitors the state of each node and it applies load balancing only on the available slaves ● MaxScale creates 2 or more connections, one for R/W on the master node and one R/O load balanced on the slave nodes ● Slave automatic failover, server weighting, replication consistency can be applied
  15. 15. © SkySQL – The MariaDB Company Read/Write Splitting - Galera ● For applications designed to work with a single database server, they now require high availability and read scalability without application changes ● Read/Write requests are sent to a designated master in order to maintain full compatibility also at locking level ● Read/Only requests are sent to other masters, when no locking is needed (depending on the isolation level) ● MaxScale monitors the availability of the Galera nodes ● No need to set Replication consistency checks on MaxScale
  16. 16. © SkySQL – The MariaDB Company Query Monitor ● For developers and devops who need to monitor/troubleshoot their applications and the traffic between the application server and the database ● Incoming queries and outcoming results are tracked by MaxScale and info are stored in log files or they are sent to external data handlers ● Developers can have a precise logging of their queries or they can analyse the top queries that are sent to the database ● The query monitor uses filters to operate. It can coexist with other services
  17. 17. © SkySQL – The MariaDB Company Query Transformation ● For applications that cannot be modified, but queries must be evaluated and in some cases transformed, for example to apply different reads or writes ● Incoming queries are evaluated by filters using regular expressions ● The queries can be passed as is, they can be transformed or even split/trasnformed in multiple queries ● Developers can apply modifications to legacy applications without changes to the code
  18. 18. © SkySQL – The MariaDB Company Query Rewrite and Filtering 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
  19. 19. © SkySQL – The MariaDB Company Query rewrite and filtering (cont.) 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
  20. 20. © SkySQL – The MariaDB Company 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
  21. 21. © SkySQL – The MariaDB Company Extending with filters ● May be connected to form arbitrary chains ● Allows inspection, modification and rejection of requests and results ● blacklist ● data mining / log
  22. 22. © SkySQL – The MariaDB Company 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
  23. 23. Fragen? www.mariadb.com www.facebook.com/mariadb.dbms www.twitter.com/mariadb Vielen Dank! Skalierbarkeit mit MariaDB und MaxScale © Copyright 2014 SkySQL Corporation Ab. SkySQL and MariaDB are trademarks or registered trademarks of SkySQL Corporation Ab in the European Union and United States of America and/or other countries. MySQL is a trademark of Oracle Corporation Inc. Other names may be trademarks of their respective owners.
  1. A particular slide catching your eye?

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

×