MariaDB MaxScale webinar

50
© MariaDB Corpora,on Ab MariaDB MaxScale – Scalability at its Best

Transcript of MariaDB MaxScale webinar

Page 1: MariaDB MaxScale webinar

©"MariaDB"Corpora,on"Ab"

MariaDB"MaxScale"–"Scalability"at"its"Best"

Page 2: MariaDB MaxScale webinar

MariaDB MaxScale webinar

Matthew Aslett, research director

Page 3: MariaDB MaxScale webinar

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

Page 4: MariaDB MaxScale webinar

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

Page 5: MariaDB MaxScale webinar

!  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

Page 6: MariaDB MaxScale webinar

!  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

Page 7: MariaDB MaxScale webinar

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

Page 8: MariaDB MaxScale webinar

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

Page 9: MariaDB MaxScale webinar

MySQL/MariaDB: managing success

8

!  Expanding the server size

Page 10: MariaDB MaxScale webinar

MySQL/MariaDB: managing success

9

!  Expanding the server size !  Master/slave clustering (with read/write splitting etc)

Page 11: MariaDB MaxScale webinar

MySQL/MariaDB: managing success

10

!  Expanding the server size !  Master/slave clustering (with read/write splitting etc) !  Sharding

Page 12: MariaDB MaxScale webinar

!  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

Page 13: MariaDB MaxScale webinar

MySQL/MariaDB: managing success

12

!  Or all of the above

Page 14: MariaDB MaxScale webinar

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

Page 15: MariaDB MaxScale webinar

A victim of its own success?

14

!  Challenges: !  Balancing the load across the cluster ! Routing queries to the correct database node

Applica'on*

Page 16: MariaDB MaxScale webinar

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*

Page 17: MariaDB MaxScale webinar

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*

Page 18: MariaDB MaxScale webinar

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

Page 19: MariaDB MaxScale webinar

Thank You! [email protected] @maslett www.451research.com

Page 20: MariaDB MaxScale webinar

Dipti Joshi

MariaDB MaxScaleWhat Is It & What Can It Do For Me?

Page 21: MariaDB MaxScale webinar

Who am I?

•Dipti Joshi •Sr Product Manager, MariaDB MaxScale

2

Page 22: MariaDB MaxScale webinar

Agenda

• Who is MariaDB

•What is MariaDB MaxScale?

• What can MariaDB MaxScale do for me?

3

Page 23: MariaDB MaxScale webinar

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

Page 24: MariaDB MaxScale webinar

Products and Offerings•MariaDB Enterprise

5

Enterprise Software

Customer Portal, Exclusive Content

24 x 7Worldwide Support

Patch and Security Notification

Page 25: MariaDB MaxScale webinar

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

Page 26: MariaDB MaxScale webinar

What Is MaxScale?Router

ProtocolAuthentication

MonitorFilters

MaxScale!Core

Page 27: MariaDB MaxScale webinar

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

Page 28: MariaDB MaxScale webinar

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

Page 29: MariaDB MaxScale webinar

Why A Proxy Platform?

• Make it easier to build new deployment architectures

• Reduce complexity and hence risk in different environments

10

Page 30: MariaDB MaxScale webinar

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

Page 31: MariaDB MaxScale webinar

Pluggable Architecture

• Generic Core

• Flexible, easy to write plugins provide • Protocol support • Database monitoring • Request filters • Routers • Authentication support

12

Page 32: MariaDB MaxScale webinar

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

Page 33: MariaDB MaxScale webinar

• 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

Page 34: MariaDB MaxScale webinar

Authentication Plugin

• Provides for authentication mechanisms • Client & MaxScale • MaxScale to database

• Responsible for mapping disjoint authentication schemes

15

Authentication

Page 35: MariaDB MaxScale webinar

Monitor Plugin

• Monitors the database environment

• Provides availability and status information

• Tailored to particular database configurations

• Maps to common concepts

16

Monitor

Page 36: MariaDB MaxScale webinar

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

Page 37: MariaDB MaxScale webinar

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

Page 38: MariaDB MaxScale webinar

Putting it all together

19

Protocol

Protocol

FilterFilter Router

Monitor

Router Protocol

Client Application

Page 39: MariaDB MaxScale webinar

What Can MaxScale Do For Me?Router

ProtocolAuthentication

MonitorFilters

MaxScale!Core

Page 40: MariaDB MaxScale webinar

Traditional Load Balancing

• Connection based router

• Low overhead

• Balances a set of connections over a set of servers • Uses monitoring feedback • Connection weighting

21

Page 41: MariaDB MaxScale webinar

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

Page 42: MariaDB MaxScale webinar

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

Page 43: MariaDB MaxScale webinar

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

Page 44: MariaDB MaxScale webinar

MaxScale FuturesRouter

ProtocolAuthentication

MonitorFilters

MaxScale!Core

Page 45: MariaDB MaxScale webinar

Write Partitioning

• Intended for multi-master environments

• Direct writes to “appropriate” servers

• Reduce inter-node contention in clustered environments

26

Page 46: MariaDB MaxScale webinar

Simple Sharding

• Schema Based Sharding

• Key Based Sharding

• Simplified by removing • Cross-shard joins • Dynamic resharding

27

Page 47: MariaDB MaxScale webinar

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

Page 48: MariaDB MaxScale webinar

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

Page 49: MariaDB MaxScale webinar

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

Page 50: MariaDB MaxScale webinar

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