SlideShare a Scribd company logo
1 of 36
Download to read offline
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1
MySQL Fabric
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |2
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.
Safe Harbor Statement
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3
Program Agenda
 Handling Scaling
 What is sharding?
 Managing a Sharded Database
 Working with a Sharded Database
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |4
What is
this
shardin
g?
What are
the
benefits
of
sharding
?
How do I
shard my
database
?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |5
It's all about scaling...
●
Start with a single server
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |6
It's all about scaling...
●
Start with a single server
●
More and more page requests
●
...more and more reads
●
What to do?
●
Scale out!
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |7
It's all about scaling...
●
Start with a single server
●
More and more page requests
●
...more and more reads
●
What to do?
●
Scale out!
●
Replicate to read servers
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |8
It's all about scaling...
●
Start with a single server
●
More and more page requests
●
...more and more reads
●
What to do?
●
Scale out!
●
Replicate to read servers
●
Perform a read-write split
●
Writes go to master
●
Reads go to read servers
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |9
It's all about scaling...
●
More and more updates
●
Write load increases
●
What now?
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |10
It's all about scaling...
●
More and more updates
●
Write load increases
●
What now?
●
Add another master?
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |11
It's all about scaling...
●
More and more updates
●
Write load increases
●
What now?
●
Add another master?
●
Doesn't work...
●
Write load is replicated
The Growing Enterprise
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |12
It's all about scaling...
●
More and more updates
●
Write load increases
●
What now?
●
Add another master?
●
Doesn't work...
●
Write load is replicated
●
Partition database
●
Distribute writes
●
Called sharding
The Growing Enterprise
UID 10000-20000 UID 20001-40000
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |13
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |14
High-level Architecture
●
What components do we need?
●
How are they deployed?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |15
Components for a Sharding Solution
Shard
#2
Shard
#1
Shard
#3
Switch
State
Store Executor
QUERY
KEY
KEY
QUERY
Contain decision logic
for distributing queries
Contain information
about location of shards
SHARD#
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |16
Transaction and Shard Key Handling
●
How are the transactions handled?
●
How do get the shard key for a transaction?
●
How to compute shard from key?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |17
BEGIN
SELECT salary INTO @s FROM salaries WHERE emp_no = 20101;
SET @s = 1.1 * @s;
INSERT INTO salaries VALUES (20101, @s);
COMMIT
BEGIN
INSERT INTO ... 
COMMIT
Sharding key? Ah, there it is!
Session state?
Hmm... looks like
a read transaction
Oops.. it was a
write transaction!
Transaction done!
Clear session state?
New transaction! Different shard?
What about the session state?
Transaction Handling
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |18
Transaction Handling
●
Detecting transaction boundaries
●
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
What about
crashes?
Where do I store
the session state?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |19
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
Compute
Shard#
KeyShard#
(X)
(X,Y,...)
RANGE
HASH
Something else
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |20
Granularity of Sharding
●
Can multiple tables be sharded with the same key?
●
Can we shard different tables different ways?
●
Do we allow global tables?
●
Do we allow cross-database queries?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |21
Sharded Tables
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
In desperate need
of sharding!
Foreign keys
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |22
Multi-table Query with Sharded Tables
SELECT first_name, last_name, salary
FROM salaries JOIN employees USING (emp_no)
WHERE emp_no = 21012
AND CURRENT_DATE BETWEEN from_date AND to_date;
● 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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |23
Global Tables
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
Do not really need
to be sharded
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |24
Multi-table Query with 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;
● 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?
25
Insert Picture Here
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |
An extensible and easy-to-use
framework for managing a farm of
MySQL servers supporting high-
availability and sharding
MySQL Fabric
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |26
MySQL Fabric Architecture
High Availability Groups
Application
XML-RPC
SQL
SQL
Connector
Connector
Connector
Operator
MySQL
Fabric
Node
Application
Servers
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |27
High-Level Components
●
Fabric-aware Connectors
●
Python, PHP, and Java
●
Enhanced Connector API
●
MySQL Fabric Node
●
Manage information about farm
●
Provide status information
●
Execute procedures
●
MySQL Servers
●
Organized in High-Availability
Groups
●
Handling application data
High Availability
Group
Application
Connector
Connector
Connector
MySQL
Fabric
Node
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |28
MySQL Fabric Node Architecture
MySQL
MySQL Fabric
Framework
Executor
State Store
(Persister)
Sh
HA
MySQLAMQP XML-RPC
??
Connector
Connector
Connector
Protocols
Extensions
Backing
Store
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |29
MySQL Fabric: Prerequisites
●
MySQL Servers (version 5.6.10 or later)
●
Backing store database server
●
Application datatabase servers
●
Python 2.6 or 2.7
●
No support for 3.x yet
●
MySQL Utilities 1.4
●
Available at
https://dev.mysql.com/downloads/tools/utilities
●
“Development release” tab
30
Insert Picture Here
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |
Architecture for
High-Availability
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |31
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!
Examples Only
Not Yet Implemented
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |32
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
● Status: state/role of the
server
Status: Primary
Mode: Read-Write
Host: server-1.example.com
33
Insert Picture Here
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |
Architecture for
Sharding
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |34
Sharding Architecture
Shards
MySQL Fabric
Node
Application
Connector
Connector
Connector
Global
Group
Global Updates
Shard
Updates
Replication
Support global update
for off-line shards
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |35
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |36
Thank you!

More Related Content

What's hot

Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricMats Kindahl
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiRemote MySQL DBA
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
Scaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesScaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesLaine Campbell
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMorgan Tocker
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricMats Kindahl
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Proxysql use case scenarios fosdem17
Proxysql use case scenarios    fosdem17Proxysql use case scenarios    fosdem17
Proxysql use case scenarios fosdem17Alkin Tezuysal
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASAshnikbiz
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterMariaDB Corporation
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices Ted Wennmark
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 Geir Høydalsvik
 
01 upgrade to my sql8
01 upgrade to my sql8 01 upgrade to my sql8
01 upgrade to my sql8 Ted Wennmark
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMorgan Tocker
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015Sanjay Manwani
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMorgan Tocker
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMatt Lord
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 

What's hot (20)

Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
Scaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesScaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web Services
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL Fabric
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Proxysql use case scenarios fosdem17
Proxysql use case scenarios    fosdem17Proxysql use case scenarios    fosdem17
Proxysql use case scenarios fosdem17
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
01 upgrade to my sql8
01 upgrade to my sql8 01 upgrade to my sql8
01 upgrade to my sql8
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big Data
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 

Similar to Mysql User Camp : 20-June-14 : Mysql Fabric

MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014Manish Kumar
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesShivji Kumar Jha
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementMark Matthews
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBAJeff Smith
 
My sql fabric webinar v1.1
My sql fabric webinar v1.1My sql fabric webinar v1.1
My sql fabric webinar v1.1Ricky Setyawan
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschemaIvan Ma
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXBruno Borges
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperJeff Smith
 
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityOracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityNoel Sidebotham
 
NoSQL, Growing up at Oracle
NoSQL, Growing up at OracleNoSQL, Growing up at Oracle
NoSQL, Growing up at OracleDATAVERSITY
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014Anuj Sahni
 
MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)Ryusuke Kajiyama
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLTed Wennmark
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018Jeff Smith
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperJeff Smith
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Kellyn Pot'Vin-Gorman
 
MySQL Webinar Series 4/4 - Manage & tune
MySQL Webinar Series 4/4 - Manage & tuneMySQL Webinar Series 4/4 - Manage & tune
MySQL Webinar Series 4/4 - Manage & tuneMark Swarbrick
 
KSCOPE Cloud Services and the Self Service Portal
KSCOPE Cloud Services  and the Self Service PortalKSCOPE Cloud Services  and the Self Service Portal
KSCOPE Cloud Services and the Self Service PortalKellyn Pot'Vin-Gorman
 
IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!Kellyn Pot'Vin-Gorman
 

Similar to Mysql User Camp : 20-June-14 : Mysql Fabric (20)

MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New Features
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
 
My sql fabric webinar v1.1
My sql fabric webinar v1.1My sql fabric webinar v1.1
My sql fabric webinar v1.1
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
UKOUG
UKOUG UKOUG
UKOUG
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
 
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration UtilityOracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
Oracle Warehouse Builder to Oracle Data Integrator 12c Migration Utility
 
NoSQL, Growing up at Oracle
NoSQL, Growing up at OracleNoSQL, Growing up at Oracle
NoSQL, Growing up at Oracle
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014
 
MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQL
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
MySQL Webinar Series 4/4 - Manage & tune
MySQL Webinar Series 4/4 - Manage & tuneMySQL Webinar Series 4/4 - Manage & tune
MySQL Webinar Series 4/4 - Manage & tune
 
KSCOPE Cloud Services and the Self Service Portal
KSCOPE Cloud Services  and the Self Service PortalKSCOPE Cloud Services  and the Self Service Portal
KSCOPE Cloud Services and the Self Service Portal
 
IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!
 

More from Mysql User Camp

Json improvements in my sql 8.0
Json improvements in my sql 8.0  Json improvements in my sql 8.0
Json improvements in my sql 8.0 Mysql User Camp
 
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONEXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONMysql User Camp
 
MySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMysql User Camp
 
Customer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR KarthikCustomer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR KarthikMysql User Camp
 
Optimizer overviewoow2014
Optimizer overviewoow2014Optimizer overviewoow2014
Optimizer overviewoow2014Mysql User Camp
 
Multi source replication pdf
Multi source replication pdfMulti source replication pdf
Multi source replication pdfMysql User Camp
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 

More from Mysql User Camp (10)

Json improvements in my sql 8.0
Json improvements in my sql 8.0  Json improvements in my sql 8.0
Json improvements in my sql 8.0
 
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONEXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
 
Doc store
Doc storeDoc store
Doc store
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
Mysql8for blr usercamp
Mysql8for blr usercampMysql8for blr usercamp
Mysql8for blr usercamp
 
MySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana YeruvaMySQL docker with demo by Ramana Yeruva
MySQL docker with demo by Ramana Yeruva
 
Customer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR KarthikCustomer Experience: InnoDB Cluster Implementation by PR Karthik
Customer Experience: InnoDB Cluster Implementation by PR Karthik
 
Optimizer overviewoow2014
Optimizer overviewoow2014Optimizer overviewoow2014
Optimizer overviewoow2014
 
Multi source replication pdf
Multi source replication pdfMulti source replication pdf
Multi source replication pdf
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 

Recently uploaded

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Recently uploaded (20)

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Mysql User Camp : 20-June-14 : Mysql Fabric

  • 1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1 MySQL Fabric
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |2 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. Safe Harbor Statement
  • 3. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3 Program Agenda  Handling Scaling  What is sharding?  Managing a Sharded Database  Working with a Sharded Database
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |4 What is this shardin g? What are the benefits of sharding ? How do I shard my database ?
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |5 It's all about scaling... ● Start with a single server The Growing Enterprise
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |6 It's all about scaling... ● Start with a single server ● More and more page requests ● ...more and more reads ● What to do? ● Scale out! The Growing Enterprise
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |7 It's all about scaling... ● Start with a single server ● More and more page requests ● ...more and more reads ● What to do? ● Scale out! ● Replicate to read servers The Growing Enterprise
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |8 It's all about scaling... ● Start with a single server ● More and more page requests ● ...more and more reads ● What to do? ● Scale out! ● Replicate to read servers ● Perform a read-write split ● Writes go to master ● Reads go to read servers The Growing Enterprise
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |9 It's all about scaling... ● More and more updates ● Write load increases ● What now? The Growing Enterprise
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |10 It's all about scaling... ● More and more updates ● Write load increases ● What now? ● Add another master? The Growing Enterprise
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |11 It's all about scaling... ● More and more updates ● Write load increases ● What now? ● Add another master? ● Doesn't work... ● Write load is replicated The Growing Enterprise
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |12 It's all about scaling... ● More and more updates ● Write load increases ● What now? ● Add another master? ● Doesn't work... ● Write load is replicated ● Partition database ● Distribute writes ● Called sharding The Growing Enterprise UID 10000-20000 UID 20001-40000
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |13 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
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |14 High-level Architecture ● What components do we need? ● How are they deployed?
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |15 Components for a Sharding Solution Shard #2 Shard #1 Shard #3 Switch State Store Executor QUERY KEY KEY QUERY Contain decision logic for distributing queries Contain information about location of shards SHARD#
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |16 Transaction and Shard Key Handling ● How are the transactions handled? ● How do get the shard key for a transaction? ● How to compute shard from key?
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |17 BEGIN SELECT salary INTO @s FROM salaries WHERE emp_no = 20101; SET @s = 1.1 * @s; INSERT INTO salaries VALUES (20101, @s); COMMIT BEGIN INSERT INTO ...  COMMIT Sharding key? Ah, there it is! Session state? Hmm... looks like a read transaction Oops.. it was a write transaction! Transaction done! Clear session state? New transaction! Different shard? What about the session state? Transaction Handling
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |18 Transaction Handling ● Detecting transaction boundaries ● 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 What about crashes? Where do I store the session state?
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |19 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 Compute Shard# KeyShard# (X) (X,Y,...) RANGE HASH Something else
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |20 Granularity of Sharding ● Can multiple tables be sharded with the same key? ● Can we shard different tables different ways? ● Do we allow global tables? ● Do we allow cross-database queries?
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |21 Sharded Tables 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 In desperate need of sharding! Foreign keys
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |22 Multi-table Query with Sharded Tables SELECT first_name, last_name, salary FROM salaries JOIN employees USING (emp_no) WHERE emp_no = 21012 AND CURRENT_DATE BETWEEN from_date AND to_date; ● 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
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |23 Global Tables 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 Do not really need to be sharded
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |24 Multi-table Query with 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; ● 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?
  • 25. 25 Insert Picture Here Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 | An extensible and easy-to-use framework for managing a farm of MySQL servers supporting high- availability and sharding MySQL Fabric
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |26 MySQL Fabric Architecture High Availability Groups Application XML-RPC SQL SQL Connector Connector Connector Operator MySQL Fabric Node Application Servers
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |27 High-Level Components ● Fabric-aware Connectors ● Python, PHP, and Java ● Enhanced Connector API ● MySQL Fabric Node ● Manage information about farm ● Provide status information ● Execute procedures ● MySQL Servers ● Organized in High-Availability Groups ● Handling application data High Availability Group Application Connector Connector Connector MySQL Fabric Node
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |28 MySQL Fabric Node Architecture MySQL MySQL Fabric Framework Executor State Store (Persister) Sh HA MySQLAMQP XML-RPC ?? Connector Connector Connector Protocols Extensions Backing Store
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |29 MySQL Fabric: Prerequisites ● MySQL Servers (version 5.6.10 or later) ● Backing store database server ● Application datatabase servers ● Python 2.6 or 2.7 ● No support for 3.x yet ● MySQL Utilities 1.4 ● Available at https://dev.mysql.com/downloads/tools/utilities ● “Development release” tab
  • 30. 30 Insert Picture Here Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 | Architecture for High-Availability
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |31 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! Examples Only Not Yet Implemented
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |32 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 ● Status: state/role of the server Status: Primary Mode: Read-Write Host: server-1.example.com
  • 33. 33 Insert Picture Here Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 | Architecture for Sharding
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |34 Sharding Architecture Shards MySQL Fabric Node Application Connector Connector Connector Global Group Global Updates Shard Updates Replication Support global update for off-line shards
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |35 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
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.| Percona Live | April 3, 2014 |36 Thank you!