my sql fabric webinar v1.1

67
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1 MySQL Fabric: Easy Management of MySQL Servers Ricky Setyawan MySQL Principal Sales Consultant [email protected]

Upload: ricky-setyawan

Post on 15-Jul-2015

186 views

Category:

Data & Analytics


3 download

TRANSCRIPT

Page 1: My sql fabric webinar v1.1

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1

MySQL Fabric:Easy Management of MySQL Servers

Ricky SetyawanMySQL Principal Sales Consultant [email protected]

Page 2: My sql fabric webinar v1.1

2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decision. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 4: My sql fabric webinar v1.1

4 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Outline

• Introducing MySQL Fabric• High-Availability• Scaling• Managing• Connecting

Page 5: My sql fabric webinar v1.1

5

Insert Picture Here

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.|

An extensible and easy-to-use framework for managing a farm of MySQL server supporting high-availability and sharding

MySQL Fabric

Page 6: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |6

MySQL Fabric: What is it?

● “Farm” Management System● Distributed Framework

● Procedure Execution● Farm Management

● Extensible● Extensions are first-class● High-Availability Groups● “Semi-Automatic” Sharding

● Written in Python

● Early alpha● Long road ahead

● Open Source● You can participate● Suggest features● Report bugs● Contribute patches

● MySQL 5.6 is the focus

Page 7: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |7

MySQL Fabric: Goals & Features● Connector API Extensions

● Support Transactions● Support full SQL

● Decision logic in connector● Reducing network load

● Load Balancing● Read-Write Split● Distribute transactions

● Global Updates● Global tables● Schema updates

● Shard Multiple Tables● Using same key

● Sharding Functions● Range● (Consistent) Hash

● Shard Operations● Using built-in executor● Shard move● Shard split

Page 8: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |8

Transaction Handling

Page 9: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |9

● Routing Transactions● Pre-declare properties of transactions● Detecting transaction boundaries● Push as much as possible to server

● Managing Session State● Move session state between servers

– Easy to use– Expensive and error prone

● Reset state after each transaction– Transactions start with default session state

Transaction Handling

What aboutcrashes?

Where do I storethe session state?

What SessionState Change?

Page 10: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |10

Routing Transactions

Shard #2

Shard #1

Shard #3

Switch

StateStore Executor

QUERYKEY

KEY

QUERY

Contain decision logicfor routing queries

Contain informationabout location of shards

SHARD#

Page 11: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |11

Deployment for Routing Transactions

Shard #2

Shard #1

Shard #3

Switch

StateStore Executor

Network hop!Performance?

Protocol?

Single Pointsof Failure!

Page 12: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |12

Deployment for Routing Transactions

Shard #2

Shard #1

Shard #3

Switch

StateStore Executor

Deployed with application(e.g., inside connector)

API simple to add

Caches can beused to avoid

performance impact

Page 13: My sql fabric webinar v1.1

13

Insert Picture Here

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.|

Introducing MySQL Fabric

Page 14: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |14

Birds-eye View

High Availability Groups (Shards)

MySQL FabricNode

Application

XML-RPC

SQL

SQL

Connector

Connector

Connector

Operator

Page 15: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |15

High-Level Components

● Fabric-aware Connectors● Python, PHP, and Java● Extended Connector API

● MySQL Servers● In High-Availability Groups● Managing the data

● MySQL Fabric Node● Maintain Meta-Information● Information Interfaces● Execute Procedures

High Availability Group

Application

MySQLFabricNode

Page 16: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |16

MySQL Fabric Node Architecture

MySQL

MySQL FabricFramework

ExecutorState Store(Persister)

Sh

?

HA

MySQLAMQP XML-RPC??

Protocols

Extensions

BackingStore

Page 17: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |17

MySQL Fabric: Prerequisites

● MySQL Servers (version 5.6.10 or later)● Server for meta-data backing store● Servers being managed

● Python 2.6 or 2.7● No support for 3.x yet

● MySQL Utilities 1.4.0● Available at http://labs.mysql.com/

Page 18: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |18

MySQL Fabric: Configuration● Backing Store

● MySQL server● Persistent storage for state● Storage engine-agnostic

● Protocol● Address where node will be● Currently only XML-RPC

● Logging● Chatty: INFO (default)● Moderate: WARNING● URL for rotating log

[storage]address = localhost:3306user = fabricpassword =database = fabricconnection_timeout = 6

[protocol.xmlrpc]address = localhost:8080threads = 5

[logging]level = INFOurl = file:///var/log/fabric.log

Page 19: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |19

MySQL Fabric: Setup and Teardown

● Create the necessary tables in backing store

mysqlfabric manage setup

● Remove the tables from backing store

mysqlfabric manage teardown

● Connect to database server in “storage” section● Ensure that you have the necessary users and privileges

Page 20: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |20

MySQL Fabric: Starting and Stopping

● Start MySQL Fabric node in foreground – print log to terminal

mysqlfabric manage start

● Start MySQL Fabric node in background – print log to file

mysqlfabric manage start --daemonize

● Stop MySQL Fabric node

mysqlfabric manage stop

Page 21: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |21

MySQL Fabric Hands-on Workshop

- Login to your Oracle virtual machine using Putty VM IP : 192.168.56.101 Username : root Password : 123456

- Start all MySQL instances In this workshop (7 instances)/usr/local/fabric_ws/start_all_mysql.sh

- Start mysqlfabric process (using & so it runs in background)

mysqlfabric manage start &

Page 22: My sql fabric webinar v1.1

22

Insert Picture Here

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.|

Architecture forHigh-Availability

Page 23: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |23

High-Availability Concepts

● Redundancy● Duplicate critical

components

● Monitoring● Detecting failing

components● Monitor load

● Procedure● Activate backups● Distribute load

Page 24: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |24

High-Availability Group Concept● Group of servers

● Hardware redundancy● Data redundancy

● Generic Concept● Implementation-independent● Self-managed or externally

managed

● Different Types● Primary-Backup (Master-Slave)● Shared or Replicated Storage● MySQL Cluster

Done!

Page 25: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |25

High-Availability Group Concept

● Abstract Concept● Set of servers● Server attributes

● Connector Attributes● Connection information● Mode: read-only, read-write, ...● Weight: distribute load

● Management Attributes● State: state/role of the server State: Primary

Mode: Read-WriteHost: server-1.example.com

Page 26: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |26

MySQL Fabric: Create Groups and add Servers

● Define a group

mysqlfabric group create my_group

● Add servers to group

mysqlfabric group add my_group server1.example.com \ mats xyzzy

mysqlfabric group add my_group server2.example.com \ mats xyzzy

User + Password(Likely to go away)

Page 27: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |27

MySQL Fabric: Create Groups and add Servers

● Promote one server to be primary

mysqlfabric group promote my_group

● Tell failure detector to monitor group

mysqlfabric group activate my_group

Page 28: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |28

MySQL Fabric Hands-on WorkshopApp Server

ConnectorCache Fabric Node

Port : 13306

Shard1

SecondaryPort : 3309

PrimaryPort : 3308

Shard2

SecondaryPort : 3311

PrimaryPort : 3310

GlobalGroup

PrimaryPort : 3306

SecondaryPort : 3307

Page 29: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |29

MySQL Fabric Hands-on Workshop

- Create fabric groups mysqlfabric group create GlobalGroupmysqlfabric group create Shard1mysqlfabric group create Shard2

Page 30: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |30

MySQL Fabric Hands-on Workshop

- Adding servers and promote to primary

GlobalGroup : # Global Groupmysqlfabric group add GlobalGroup 127.0.0.1:3306mysqlfabric group lookup_servers GlobalGroupmysqlfabric group promote GlobalGroupmysqlfabric group lookup_servers GlobalGroupmysqlfabric group add GlobalGroup 127.0.0.1:3307mysqlfabric group lookup_servers GlobalGroup

Page 31: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |31

MySQL Fabric Hands-on Workshop

[[email protected] data_gs]# mysqlfabric group lookup_servers GlobalGroupCommand :{ success = True return = [{'status': 'PRIMARY', 'server_uuid': 'ddba4771-35d0-11e4-a71d-080027a7161e', 'mode': 'READ_WRITE', 'weight': 1.0, 'address': '127.0.0.1:3306'}, {'status': 'SECONDARY', 'server_uuid': 'fc6e324e-35d0-11e4-a71e-080027a7161e', 'mode': 'READ_ONLY', 'weight': 1.0, 'address': '127.0.0.1:3307'}] activities = }

Page 32: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |32

MySQL Fabric Hands-on Workshop

- Adding servers and promote to primary

Shard 1 : mysqlfabric group add Shard1 127.0.0.1:3308mysqlfabric group lookup_servers Shard1mysqlfabric group promote Shard1mysqlfabric group lookup_servers Shard1mysqlfabric group add Shard1 127.0.0.1:3309mysqlfabric group lookup_servers Shard1

Page 33: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |33

MySQL Fabric Hands-on Workshop

[[email protected] data_gs]# mysqlfabric group lookup_servers Shard1Command :{ success = True return = [{'status': 'PRIMARY', 'server_uuid': '266384c5-35d1-11e4-a71f-080027a7161e', 'mode': 'READ_WRITE', 'weight': 1.0, 'address': '127.0.0.1:3308'}, {'status': 'SECONDARY', 'server_uuid': '2d924643-35d1-11e4-a71f-080027a7161e', 'mode': 'READ_ONLY', 'weight': 1.0, 'address': '127.0.0.1:3309'}] activities = }

Page 34: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |34

MySQL Fabric Hands-on Workshop

- Adding servers and promote to primary

Shard 2 : mysqlfabric group add Shard2 127.0.0.1:3310mysqlfabric group lookup_servers Shard2mysqlfabric group promote Shard2mysqlfabric group lookup_servers Shard2mysqlfabric group add Shard2 127.0.0.1:3311mysqlfabric group lookup_servers Shard2

Page 35: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |35

MySQL Fabric Hands-on Workshop

[[email protected] data_gs]# mysqlfabric group lookup_servers Shard2Command :{ success = True return = [{'status': 'PRIMARY', 'server_uuid': '4cc6c541-35d1-11e4-a720-080027a7161e', 'mode': 'READ_WRITE', 'weight': 1.0, 'address': '127.0.0.1:3310'}, {'status': 'SECONDARY', 'server_uuid': '526a8154-35d1-11e4-a720-080027a7161e', 'mode': 'READ_ONLY', 'weight': 1.0, 'address': '127.0.0.1:3311'}] activities = }

Page 36: My sql fabric webinar v1.1

36

Insert Picture Here

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.|

Connecting to aMySQL Fabric Farm

Page 37: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |37

Fabric-aware Connector API

● Connector API Extensions● Support Transactions● Support full SQL

● Decision logic in connector● Reducing network load

● Load Balancing● Read-Write Split● Distribute transactions

● Fabric-aware Connectors● Connector/J● Connector/Python● Connector/PHP

● Fabric-aware Frameworks● Doctrine● Hibernate

● Focus on Connector/Python

Page 38: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |38

Fabric-aware Connector API

● Establish a “virtual” connection● Real server connection established lazily

● Provide connection information for the Fabric node● Fabric node will provide information about real servers

import mysql.connector.fabric as connector

conn = connector.MySQLFabricConnection( fabric={"host": "fabric.example.com", "port" : 8080}, user='mats', database="employees")

Page 39: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |39

Connector API: Executing a Transaction

● Provide group name● Property: group● Fabric will compute

candidate servers

● Provide transaction type● Property: type● Fabric will pick server in

right mode

conn.set_property(group='my_group', type=TYPE_READWRITE)cur = conn.cursor()cur.execute("INSERT INTO employees VALUES (%s,%s,%s)", (emp_no, first_name, last_name))cur.execute("INSERT INTO titles(emp_no,title,from_date)" “ VALUES (%s,%s,CURDATE())", (emp_no, 'Intern'));conn.commit() Transactions work fine!

Page 40: My sql fabric webinar v1.1

40

Insert Picture Here

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.|

Architecture forSharding

Page 41: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |41

Benefits of Sharding

● Write scalability● Can handle more writes

● Large data set● Database too large● Does not fit on single server

● Improved performance● Smaller index size● Smaller working set● Improve performance

UID 10000-20000 UID 20001-40000

Page 42: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |42

MySQL Fabric: Sharding Goals & Features

● Connector API Extensions● Support Transactions● Support full SQL

● Decision logic in connector● Reducing network load

● Shard Multiple Tables● Using same key

● Global Updates● Global tables● Schema updates

● Sharding Functions● Range● (Consistent) Hash

● Shard Operations● Using built-in executor● Shard move● Shard split

Page 43: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |43

Mapping the Sharding Key

● What is a sharding key?● Single column● Multi column

– Same table?– Different tables?

● How is the key transformed?● Hash● Range● User-defined

ComputeShard#

Key

Shard#

(X)(X,Y,...)

RANGEHASHSomething else

Page 44: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |44

Table Rows

salaries 284 404 700

titles 44 330 800

employees 30 002 400

dept_emp 33 160 300

dept_manager 2 400

departments 900

Sharded Tables

In desperate needof sharding!

Foreign keys

Page 45: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |45

Multi-table Query with Sharded Tables

● Referential Integrity Constraint● Example query joining salaries and employees● Same key, same shard: co-locate rows for same user

● JOIN normally based on equality● Using non-equality defeats purpose of foreign key

SELECT first_name, last_name, salaryFROM salaries JOIN employees USING (emp_no)WHERE emp_no = 21012 AND CURRENT_DATE BETWEEN from_date AND to_date;

Page 46: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |46

Table Rows

salaries 284 404 700

titles 44 330 800

employees 30 002 400

dept_emp 33 160 300

dept_manager 2 400

departments 900

Global Tables

Does not needto be sharded

Page 47: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |47

Multi-table Query with Global Tables

● JOIN with departments table● Has no employee number, hence no sharding key● Table need to be present on all shards

● How do we update global tables?

SELECT first_name, last_name, GROUP_CONCAT(dept_name) FROM employees JOIN dept_emp USING (emp_no) JOIN departments USING (dept_no)WHERE emp_no = 21012 GROUP BY emp_no;

Page 48: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |48

Sharding Architecture

Shards

MySQL Fabric Node

Application

GlobalGroup

Global Updates

ShardUpdates

Replication

Support global updatefor off-line shards

Page 49: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |49

MySQL Fabric: Sharding Setup

● Set up some groups● my_global – for global updates● my_group* – for the shards● Add servers to the groups

● Create a shard mapping● A “distributed database”● Mapping keys to shards● Give information on what tables are sharded

● Add shards

Page 50: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |50

MySQL Fabric: Set up Shard Mapping

● Define shard mapping

mysqlfabric sharding create_definition hash my_global

● Add tables that should be sharded

mysqlfabric sharding add_table 1 \ employees.employees emp_no

mysqlfabric sharding add_table 1 \ employees.salaries emp_no

● Tables not added are global

Will show the shard mapidentifier (a number)

Shard map identifier

Per-mapping Global Group(Likely to go away)

Page 51: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |51

MySQL Fabric: Add Shards

● Add shards to shard mapping

mysqlfabric sharding add_shard 1 my_group.1 enabled . . .

mysqlfabric sharding add_shard 1 my_group.N enabled

Shard map identifier

Page 52: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |52

MySQL Fabric: Moving and Splitting Shards

● Moving a shard from one group to another

mysqlfabric sharding move 5 my_group.5

● Splitting a shard into two pieces (hash)

mysqlfabric sharding split 5 my_group.6

Shard ID

Page 53: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |53

MySQL Fabric Hands-on Workshop

-Activate failure detectormysqlfabric group activate Globalgroupmysqlfabric group activate Shard1mysqlfabric group activate Shard2

-Create sharding definitionsmysqlfabric sharding create_definition RANGE GlobalGroup

-Add Tables to Defined Shard Mappingsmysqlfabric sharding add_table 1 test.emp emp_no

Page 54: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |54

MySQL Fabric Hands-on Workshop

-Add Shards for the Registered Tablesmysqlfabric sharding add_shard 1 "Shard1/1, Shard2/1000" --state=ENABLED

Page 55: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |55

Digression: Computing Shards

● Multiple Mappings● Which mapping to use?● Application don't care● … but know tables in transaction● Currently only one mapping

● Computing shard requires● Tables + sharding key

● Extended Connector API● Extra properties passed out-of-band

ComputeShard#

Key

Shard#

Map#

ComputeMap#

Tables

Page 56: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |56

Connector API: Shard Specific Query

● Provide tables in query● Property: tables● Fabric will compute map

● Provide sharding key● Property: key● Fabric will compute shard

conn.set_property(tables=['employees.employees', 'employees.titles'], key=emp_no)cur = conn.cursor()cur.execute("INSERT INTO employees VALUES (%s,%s,%s)", (emp_no, first_name, last_name))cur.execute("INSERT INTO titles(emp_no, title, from_date)" “ VALUES (%s, %s, CURDATE())", (emp_no, 'Intern'));conn.commit() Transactions work fine!

Page 57: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |57

Connector API: Shard Specific Query

● Provide tables in query● Property: tables● Fabric will compute map

● Provide sharding key● Property: key● Fabric will compute shard

conn.set_property(tables=['employees.employees', 'employees.titles'], key=emp_no)cur = conn.cursor()cur.execute( "SELECT first_name, last_name, title" " FROM employees JOIN titles USING (emp_no)" " WHERE emp_no = %d", (emp_no,))for row in cur: print row[0], row[1], “,“, row[2]

Join queries are sent to correctshard and executed there

Page 58: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |58

Connector API: Global Update

● Provide tables in query● Property: tables● Fabric will compute map● (Likely to not be needed)

● Set global scope● Property: scope● Query goes to global group

conn.set_property(tables=['employees.titles'], scope='GLOBAL')cur = conn.cursor()cur.execute("ALTER TABLE employees.titles ADD nickname VARCHAR(64)")

Page 59: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |59

MySQL Fabric Hands-on Workshop

-Create test table via Global Group./mysql --port=3306 --protocol=tcp -urootUSE testCREATE TABLE emp(emp_no INT, first_name VARCHAR(32), last_name VARCHAR(32));

-Run sample programpython /usr/local/fabric_ws/fabric-demo.py

Page 60: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |60

MySQL Fabric Hands-on Workshop

-Testing scenarios- Kill Fabric store instance - Kill GlobalGroup primary node- Kill Shard1 primary node

Page 61: My sql fabric webinar v1.1

61

Insert Picture Here

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.|

Closing Remarks

Page 62: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |62

What do we have now?● MySQL Farm Management

● High-Availability● Sharding

● High-Availability● Group Concept● Simple failure detector● Slave promotion

● Connector APIs● Transaction properties● “Logical” connection

management

● Enhanced Connectors● Connector/Python● Connector/PHP● Connector/J

● Sharding● Range and hash sharding● Shard move and shard split● Global tables and updates

● Command-line Interface● Easy setup and

management● XML-RPC Interfaces

Page 63: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |63

Thoughts for the Future

● Connector multi-cast● Scatter-gather● UNION of result sets● More complex operations?

● Internal interfaces● Improve extension support● Improve procedures

support

● Command-line interface● Improving usability● Focus on ease-of-use

● More protocols● MySQL-RPC Protocol?● AMQP?

● More frameworks?

● More HA group types● DRBD● MySQL Cluster

● Fabric-unaware connectors?

Page 64: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |64

Thoughts for the Future

● “More transparent” sharding● Single-query transactions● Cross-shard join is a

problem

● Multiple shard mappings● Independent tables

● Multi-way shard split● Efficient initial sharding● Better use of resources

● High-availability executor● Node failure stop execution● Replicated State Machine● Fail over to other Fabric

node

● Distributed failure detector● Connectors report failures● Custom failure detectors

Page 65: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |65

Want to contribute?

● Check it

… and send us use-case and feature suggestions

● Test it

… and send comments to the forum

● Break it

… and send in bugs to http://bugs.mysql.com

Page 66: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |66

Reading for the Interested

● MySQL Forum: Fabric, Sharding, HA, Utilitieshttp://forums.mysql.com/list.php?144

● A Brief Introduction to MySQL Fabrichttp://mysqlmusings.blogspot.com/2013/09/brief-introduction-to-mysql-fabric.html

● MySQL Fabric – Sharding – Introductionhttp://vnwrites.blogspot.com/2013/09/mysqlfabric-sharding-introduction.html

● Writing a Fault-tolerant Database Application using MySQL Fabrichttp://alfranio-distributed.blogspot.se/2013/09/writing-fault-tolerant-database.html

Page 67: My sql fabric webinar v1.1

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |67

Mats KindahlTwitter: @mkindahlBlog: http://mysqlmusings.blogspot.com

Andrew Morgan (Product Management)Twitter: @andrewmorganBlog: http://clusterdb.com

Alfranio CorreiaTwitter: @alfranioBlog: http://alfranio-distributed.blogspot.com

Narayanan VenkateswaranTwitter: @vn_tweetsBlog: http://vnwrites.blogspot.com

Keeping in Touch