MariaDB Europe Roadshow 2015 - MariaDB MaxScale

23
© 2015, MariaDB Corp. MariaDB Roadshow 2015 MariaDB MaxScale

Transcript of MariaDB Europe Roadshow 2015 - MariaDB MaxScale

© 2015, MariaDB Corp. © 2015, MariaDB Corp.

MariaDB Roadshow 2015

MariaDB  MaxScale  

© 2015, MariaDB Corp.

Content

●  Why and What of MaxScale ? ●  MariaDB MaxScale Benefits ●  MariaDB MaxScale Packaging

© 2015, MariaDB Corp.

Needs of Web Scale organization ●  Ability to support growing user base ○  Scalability

●  Deliver quality customer experience ○  High Availability ○  Continuity ○  Performance ○  Data Security

●  Control cost ○  Development Friendliness ○  Improve DBA Productivity

●  Competitive Advantage ○  Innovation Rollout ○  New Service Creation

© 2015, MariaDB Corp.

Challenges of Scalability with MariaDB & MySQL

Application Business Logic

Application Database Connection Management

MySQL/MariaDB connector

●  Complex application ●  Reduced Development Agility

and DBA Productivity ●  Longer time to market

●  For security requirements additional database firewall needed

Database Firewall Database Firewall

1:100 101:200 201:300 301:...

Database Firewall

●  Load Balance queries ●  Send queries to node per load balancing ●  Detect node failure and failover ●  Detect node addition or removal

●  Determine which shard to send the query ●  If sharding schema changes, or a new shard

added, ○  update the application code

MariaDB/MySQL Replication

MariaDB Galera Cluster

Data Sharding

© 2015, MariaDB Corp.

MariaDB MaxScale

●  A flexible open source platform that sits between applications and databases for MariaDB and MySQL ●  Databases scale without any impact on applications ●  Developer and DBA friendly solution for scalability, high

availability, continuity and database security ●  Flexible architecture allows creation of new services not

possible just with database platforms

Mon

itor Filter &

Logging Routing

MaxScaleCore

Routing

© 2015, MariaDB Corp.

MariaDB MaxScale: Web Scale Database Proxy

Client Simple

Requests

MaxScale

© 2015, MariaDB Corp.

MariaDB MaxScale 1.0 Feature List

●  MySQL and MariaDB client and server protocols ●  MariaDB Galera and MySQL replication cluster monitoring ●  Connection based load balancing ●  Statement based load balancing ●  Query performance logging ●  Top N Query logging ●  Query transformation based on regular expressions and time ●  Query duplication to another database, storage engine or application ●  Extensible plugin architecture ●  Extension possibilities

○  Optimized routing to Galera multi-master nodes to avoid deadlock ○  Replication across geographically distributed HA clusters ○  New client protocols such as PL-SQL, T-SQL, PostgresSQL, JSON, HTTP ○  New server protocols such as Hadoop, MongoDB, Cassandra, CouchBase ○  New clustering technologies such as MySQL NDB Cluster, Hadoop Cluster, MongoDB

Cluster ○  Transform, block or log client requests and results conditionally

© 2015, MariaDB Corp.

Scalability with MaxScale for MariaDB/MySQL replication

Application Business Logic

Application Database Connection Management

MySQL/MariaDB connector

MaxScale

Connection and Statement based load balancing

●  Simplifies applications ○  Improved Developer productivity

●  Cluster configuration transparent to applications ○  Improved DBA productivity

●  Monitors backend database high availability ○  Improved Business Continuity

●  Load Balance queries ●  Route queries to node per load balancing algorithm ●  Detect node failure and failover ●  Detect node addition or removal

●  Send queries over a single server connection to MaxScale

MariaDB Galera Cluster MariaDB/MySQL Replication

© 2015, MariaDB Corp.

Query Transformation with MaxScale for Legacy Application Compatibility

Modify queries from legacy applications on the fly - for example a MySQL 5.1 app:

1.  MaxScale accepts a query from a MySQL 5.1 compatible client,

2.  If the query matches the regular expression “/CREATE TABLE/” then MaxScale substitutes “ENGINE” for “TYPE” in that statement, else it passes the statement through the filter unchanged.

3.  Forwards the transformed statement to MariaDB or MySQL 5.6.

4.  Receives the result from the back-end. 5.  Forwards the result to the client.

MaxScale

1 5

3 4

/CREATE TABLE/

s/TYPE/ENGINE/

2

●  Application and Database can be upgraded asynchronously ○  Improves business continuity ○  Improve organizational productivity

●  Faster rollout of new database versions

MySQL 5.1

MySQL 5.6 or MariaDB 10

© 2015, MariaDB Corp.

Query Logging with MaxScale For Performance Diagnostics

1.  MaxScale accepts a query from a client application

2.  Forwards the query to the back-end ○  Logs it into the “All Queries” ○  Logs it into the “Long Running Queries”

log files 3.  Receives the result from the back-end, 4.  Forwards the result to the client

○  Logs the result into the “All Queries” log ○  If it is one of the N longest-running

queries, logs the result into the “Long Running Queries” log file MaxScale

.log

Long Queries (Top N queries)

.log

All Queries

1 4

2

4

2

4 2 3

●  Centralized cluster wide query performance log at MaxScale ○  No need to manually correlate query

logs across cluster nodes ○  Simplified performance tuning ○  Improved DBA productivity

●  Filtering can be also used to prevent SQL injection attacks or unauthorized queries ○  Improved Security

© 2015, MariaDB Corp.

Query Duplication with MaxScale 1.  MaxScale accepts a query from a client

application 2.  Forwards the query to the back-end

○  Sends query to Database A ○  Send query to Database B via Tee-filter

3.  Receives the result from Database A 4.  Receives the result from Database B 5.  Forwards the result to the client

MaxScale

1 5

4

2 2 3

●  Cross-DB solutions: Duplicate queries to MariaDB Replication Cluster and Galera Cluster

●  ETL: Use Tee-filter to insert into transactional database and insert into analytic database via queuing to ETL process

●  Faster and smooth rollout of new services ○  Using different DB technology and

different workloads

Database A: MariaDB InnoDB Replication Cluster

Database B: MariaDB Galera Cluster or MariaDB MyISAM or CONNECT Engine for Cassandra or Spider Engine or InfiniDB Engine or RabbitMQ for another application to process

© 2015, MariaDB Corp.

MaxScale Flexible Plugin Architecture

Replicate Binlog from the master to slave through MaxScale ●  Simplified relay server ●  Reduced network load and

disaster recovery In production at Booking.com Binlog server Booking.com blog

Shard Cluster 1

Shard Cluster 2

Shard Cluster 3

Shard Cluster 4

Shard Cluster 5

Route to sharded database without application level knowledge of sharding method ●  Sharding Router based on database

schema ●  In development for Lead Desk

Another future Plugin for ●  Sharding Router based on table key ●  In early analysis for a prospect

MaxScale

Sharding Router

© 2015, MariaDB Corp.

MariaDB MaxScale Advantages

●  Developer and DBA friendly solution for ○  Scalability ○  High availability ○  Cluster wide performance tuning

●  Continuity during database upgrades ●  Data and SQL security ●  New Services with extendable plugins

© 2015, MariaDB Corp.

MariaDB MaxScale Customer Benefits

●  DBA ○  Handle large amount of data with scalable and highly available MariaDB clusters ○  Tune database performance with query logging ○  Continuous availability to applications during cluster administration and database

upgrades ●  Developer

○  Simplified development as cluster complexity hidden from applications ○  Focus on business logic instead of cluster monitoring and tracking

●  Data Architect ○  Tee-filter and Flexible Plugin architecture opens up cross-workload and cross-DB

solutions ○  Simplified and faster rollout of database versions for new services

■  Applications continue to work during database upgrades ●  CIO

○  Scale the infrastructure with growth of business ○  Scale without sacrificing developer and DBA productivity ○  Improved customer satisfaction with application continuity and performance ○  Expand business horizon with newer solutions

© 2015, MariaDB Corp.

MariaDB MaxScale Packaging

MariaDB Enterprise: ●  Enterprise Software ●  Patch and Notification Services ●  24X7 support for Enterprise Software ●  Customer Portal, Exclusive Content

MariaDB Enterprise Add-on: MariaDB MaxScale Base ●  MaxScale 1.0 GA ●  Future patch and enhancement to MaxScale Base ●  24X7 support for MaxScale Base

© 2015, MariaDB Corp. *   *  

MariaDB MaxScale Roadmap Q1 2015: MariaDB MaxScale 1.1 Beyond Q2 2015

Performance Caching layer for connectors

Scalability Binlog relay: improved HA for master/slave replication

Table-Key based simple sharding

Schema based sharding Optimized Galera routing for deadlock avoidance

MySQL Cluster (NDB) connection load balancing

Advanced Sharding support

Geographic replication for disaster resilience

© 2015, MariaDB Corp. *   *  

MariaDB MaxScale Roadmap Q1 2015: MariaDB MaxScale 1.1 Beyond Q2 2015

Ease of Use Integration with MDBE notification service

Configuration Playbooks

Nagios Plugin for monitoring

Hint based statement load balancing

Logging integrated with RabbitMQ

Security Firewall filter: Block SQL injection Client Side SSL

LDAP, Kerberos authentication

Firewalls designed for HIPPA, PCI use cases

Interoperability JSON/BSON Protocol support

© 2015, MariaDB Corp.

MariaDB MaxScale

●  A flexible platform that sits between applications and databases for MariaDB and MySQL ●  Databases scale without any impact on applications ●  Developer and DBA friendly solution for scalability, high

availability, continuity and database security ●  Flexible architecture allows creation of new services not

possible just with database platforms

© 2015, MariaDB Corp.

Resources

●  Product Page: https://mariadb.com/products/mariadb-maxscale ●  Product FAQ: https://mariadb.com/products/product-faqs ●  Data Sheet: MariaDB MaxScale Datasheet ●  Blogs:  https://mariadb.com/blog-tags/MaxScale ●  Discussion via the Google Group: [email protected] ●  MariaDB MaxScale Webinar - Scalability at its best

© 2015, MariaDB Corp.

Appendix

© 2015, MariaDB Corp.

MariaDB MaxScale 1.0 Supported OS and Databases

●  Supported OS ○  RHEL 6 ○  RHEL 5 ○  RHEL 7 ○  CentOS 6 ○  CentOS 5 ○  CentOS 7 ○  Ubuntu 12.04 LTS ○  Ubuntu 13.10 ○  Ubuntu 14.04 ○  Debian 6 ○  Debian 7 ○  OpenSUSE 13.1 ○  Fedora 19 64 bits ○  Fedora 20 64 bits ○  SLES 11 ○  SELS 12

●  Supported backend database ○  MariaDB Server and Enterprise all versions ○  MariaDB Enterprise Cluster all versions ○  MySQL 5.1 and higher

© 2015, MariaDB Corp.

Feature Benefits: MaxScale Base DBA Developer Architect Organization CIO

Overall Benefits

Database Scalability, HA Simplicity Flexibility Organizational Scalability, Productivity, Customer Satisfaction, New revenue stream opportunities

Feature Component Feature Benefits

MySQL and MariaDB Client and Server Protocol

Core Simplified Application Development that can focus on business logic

Increased developer productivity

MariaDB Galera and MySQL replication cluster monitoring

Monitor Plugin Scalability and Reliability to handle large amount of data

Free from cluster configuration complexity

Ability to support growth of business Increased developer productivity

Monitor Plugin Administer Clusters(node addition, removal, replication setup) without impacting application

Continuous availability. Zero-downtime and hidden failover at application level,

Increase DBA productivity End user satisfaction with always available web applications

Connection and Statement based load balancing

Router Plugin Optimal and homogeneous cluster nodes utilization giving high performance and high throughput.

Improved application performance with high performance database queries

End user satisfaction with high performance web applications Optimized Capex resources

Query Performance Logging Top N Query Logging

Filter Plugin Database performance tuning

End user satisfaction

Query Statement Modification based on regular expressions

Filter Plugin Client Applications do not have to upgrade at the same time of database

Applications continue to work when upgrading from older DB version to newer version

End user satisfaction with continuous availability Improved Developer productivity

Query Duplication to another storage engine or application

Tee-Filter Plugin Cross Workload and Cross Technology Applications

New customer offerings with cross workload solutions

Flexible Plugin Architecture Core Architect New Applications not possible before

New Revenue Stream

© 2015, MariaDB Corp.

Feature Benefits: Add-on Plugins (Future) DBA Developer Architect Organization CIO

Feature Component Feature Benefits

Query Duplication to another database

Monitoring Plugin for another database type

Database migration from another db to MariaDB

Continuous availability during database migration

Replication Relay Big Log Router Horizontally scale slaves without master overload

High Performance read scalability

Scalability and Performance to meet the end user expectation

Routing Hints Hint Filter Performance tuning via hints dynamically control statement-based routers

Improved Application performance and stability

Canonical Query logging Canonical Query Filter Application Validation Improved Developer productivity and application quality

Database Firewall Firewall Filter Prevent SQL Injection attacks

Data access security without application awareness

Prevent sensitive data from leaking to the wrong parties

Data access security

Schema based sharding Table Key based sharding

Sharding Router Scalability and Performance with Sharding

Application do not need to be aware of sharding

Scalability and Performance