Download - MariaDB MaxScale webinar
©"MariaDB"Corpora,on"Ab"
MariaDB"MaxScale"–"Scalability"at"its"Best"
MariaDB MaxScale webinar
Matthew Aslett, research director
451 Research is an information technology research & advisory company Founded in 2000
210+ employees, including over 100 analysts
1,000+ clients: Technology & Service providers, corporate advisory, finance, professional services, and IT decision makers
12,500+ senior IT professionals in our research community
Over 52 million data points each quarter
4,500+ reports published each year covering 2,000+ innovative technology & service providers
Headquartered in New York City with offices in London, Boston, San Francisco, and Washington D.C.
451 Research and its sister company Uptime Institute comprise the two divisions of The 451 Group
Research & Data
Advisory Services
Events
2
The success of MySQL/MariaDB
3
! MySQL/MariaDB filled a gap in the market: • Low cost and freely available with source code • Better suited to emerging application workloads
! MySQL/MariaDB benefits:
• Lightweight architecture • Fast read capabilities • Ease of use
! MySQL/MariaDB primarily adopted for: • in-house-developed applications • single-function applications • customer-facing Web applications • development-and-test environments
The success of MySQL/MariaDB
4
! MySQL/MariaDB primarily adopted for: • in-house-developed applications • single-function applications • customer-facing Web applications • development-and-test environments
! And grew like wildfire
The success of MySQL/MariaDB
5
The success of MySQL/MariaDB
6
! As usage of MySQL/MariaDB grew, so did the size and importance of applications that depend on MySQL/MariaDB: ! Web apps: gaming, social, e-commerce. Business apps: ad networks
The success of MySQL/MariaDB
7
! As usage of MySQL/MariaDB grew, so did the size and importance of applications that depend on MySQL/MariaDB: ! Web apps: gaming, social, e-commerce. Business apps: ad networks
! As MySQL/MariaDB applications have grown, users have had to adopt a number of different approaches to scaling MySQL/MariaDB
MySQL/MariaDB: managing success
8
! Expanding the server size
MySQL/MariaDB: managing success
9
! Expanding the server size ! Master/slave clustering (with read/write splitting etc)
MySQL/MariaDB: managing success
10
! Expanding the server size ! Master/slave clustering (with read/write splitting etc) ! Sharding
! Expanding the server size ! Master/slave clustering (with read/write splitting etc) ! Sharding ! Migrating to next generation version, e.g. MariaDB
MySQL/MariaDB: managing success
11
MySQL/MariaDB: managing success
12
! Or all of the above
A victim of its own success?
13
! Whether using MySQL or MariaDB, the combination of database clustering and sharding can, at scale, present a significant management and performance challenge
A victim of its own success?
14
! Challenges: ! Balancing the load across the cluster ! Routing queries to the correct database node
Applica'on*
Enter the database proxy server
15
! Advantages: ! Abstract the database from the application ! Balancing load and query routing ! No need to change application to scale out
Database*Proxy*Server*
Applica'on*
Enter the database proxy server
16
! MaxScale: • Re-uses MariaDB parser to make proxy more transparent to the application • Query re-writing and logging without changing the application or database • Relay server with duplicate binlog to ease the load on the master in multi-
slave environments
MaxScale*
Applica'on*
Conclusion ! The success of MySQL and MariaDB has led to complications in terms of
scalability concerns ! Manual sharding techniques transfer the strain from the database to the
database administrator
! The combination of database clustering and sharding can present a significant application performance challenge
! Database proxy servers, including MaxScale, enable load balancing and query routing without changes to existing applications
17
Thank You! [email protected] @maslett www.451research.com
Dipti Joshi
MariaDB MaxScaleWhat Is It & What Can It Do For Me?
Who am I?
•Dipti Joshi •Sr Product Manager, MariaDB MaxScale
2
Agenda
• Who is MariaDB
•What is MariaDB MaxScale?
• What can MariaDB MaxScale do for me?
3
MariaDB, the Company•Founded by original MySQL team including database luminaries Monty Widenius and David Axmark
•Community Driven Innovation enhances MariaDB
•Proven Open Source and Cloud management team
•Leader, Gartner Magic Quadrant for Operational Databases, 2014
4
Products and Offerings•MariaDB Enterprise
5
Enterprise Software
Customer Portal, Exclusive Content
24 x 7Worldwide Support
Patch and Security Notification
Products and Offerings•MariaDB Enterprise
6
Enterprise Software
Customer Portal, Exclusive Content
24 x 7Worldwide Support
Patch and Security Notification
•Add on software: MariaDB MaxScale • Scale'the'infrastructure'with'growth'of'business'
• Scale'without'sacrificing'developer'and'DBA'productivity'
• Improve'customer'satisfaction'with'application'continuity'and'performance'
• Stay'competitive'by'offering'new'and'innovative'service
What Is MaxScale?Router
ProtocolAuthentication
MonitorFilters
MaxScale!Core
Database Router
The MaxScale Concept
• Decouple applications from database deployment environment
• Introduce a layer that handles scale-out issues
• Improve availability without adding application complexity
• Add flexibility without burdening every application
8
Applications
Databases
What is MaxScale?
• Simple Answer • A Classical Proxy
• It sits between the database clients and servers forwarding requests and responses
• More Complex Answer • It is a proxy platform for building highly tailored and configurable proxy implementations
• It is database aware • It is built with a pluggable architecture
9
Why A Proxy Platform?
• Make it easier to build new deployment architectures
• Reduce complexity and hence risk in different environments
10
Why Database Awareness
•Understands the database environment
•Is aware of the state of the database components
•Understands the data that flows through it
•Routes requests based on a combination of • Defined algorithms • Component state • Request contents • Session state
11
Pluggable Architecture
• Generic Core
• Flexible, easy to write plugins provide • Protocol support • Database monitoring • Request filters • Routers • Authentication support
12
MaxScale Core
• Provides core services for • configuration • networking • scheduling • query classification • logging • buffer management • plugin loading • request flow
13
MaxScale!Core
!
• Designed to make plugins easy to write
• Provides protocol implements • Client to MaxScale • MaxScale to Database
• Also used for administration protocols
• Potential to allow for non-MySQL database protocols
Protocol Plugin
14
Protocol
Authentication Plugin
• Provides for authentication mechanisms • Client & MaxScale • MaxScale to database
• Responsible for mapping disjoint authentication schemes
15
Authentication
Monitor Plugin
• Monitors the database environment
• Provides availability and status information
• Tailored to particular database configurations
• Maps to common concepts
16
Monitor
Filter Plugin
• A filter may block, modify or log a request as it passes through MaxScale
• Filters may be built up into chains
• Filters may duplicate requests
17
Filter
Router Plugin
• Routes requests to backend database servers using a combination of • Data from monitoring • Routing algorithm • Hints from filters • Request characteristics
• Two classes of router • Connection routing • Statement routing
18
Router
Putting it all together
19
Protocol
Protocol
FilterFilter Router
Monitor
Router Protocol
Client Application
What Can MaxScale Do For Me?Router
ProtocolAuthentication
MonitorFilters
MaxScale!Core
Traditional Load Balancing
• Connection based router
• Low overhead
• Balances a set of connections over a set of servers • Uses monitoring feedback • Connection weighting
21
Read Load Distribution
• Good for traditional replication environments
• Two approaches possible • Either using connection routing with separate read connections • Or statement routing, classify the statements to read, write or session modification
• Monitoring allows for tailoring to particular failover environments
22
Supported Database
• MaxScale GA supports 2 distinct database clustering environments • Master/Slave Replication • Galera Cluster
• Either connection routing or Read/Write splitting may be used in both environments
23
Additional Features
• Asymmetric Load Balancing
• MaxScale 1.0GA comes with a set of filter plugins • Log Filter (QLA) • Top Filter • Simple Query Rewrite Filter • Tee filter
24
Rewrite
MaxScale FuturesRouter
ProtocolAuthentication
MonitorFilters
MaxScale!Core
Write Partitioning
• Intended for multi-master environments
• Direct writes to “appropriate” servers
• Reduce inter-node contention in clustered environments
26
Simple Sharding
• Schema Based Sharding
• Key Based Sharding
• Simplified by removing • Cross-shard joins • Dynamic resharding
27
Replication Fan-out
•MaxScale acts as a transparent MySQL replication relay
•Reduces load on the master server
•Provides improved group commit semantics over traditional relay servers
•Allows improved master failover semantics
28
Binlog Router
29
DatabaseMySQLClient!
MySQLBackend
MyS
QLM
on
BinlogRouter
Database DatabaseDatabase Database DatabaseDatabase DatabaseDatabase Database Database Database Database DatabaseDatabase Database DatabaseDatabase DatabaseDatabase Database Database Database
binlog cache binlog cache
MySQLClient!
MySQLBackend
MyS
QLM
on
BinlogRouter
Under Development
•In development •MySQL cluster monitor •MMM multi-master monitor •Query logging via message queues •Canonical query logging •MaxScale hints in queries •Firewall filter
30
Where can I find MaxScale?
•Contact Us: https://mariadb.com/about/contact
•Binary packages on the MariaDB website
•Source in GitHub: MariaDB Corporation/MaxScale
•Discussion via the Google Group: [email protected]
•Bugs database: http://bugs.mariadb.com
•MaxScale blogs: https://mariadb.com/blog-tags/MaxScale
31