SlideShare a Scribd company logo
Exploring the new release
MySQL Cluster 7.4
In-Memory Real-Time Performance, Web Scalability & 99.999% Availability
Ivan Ma
ivanxma@yahoo.com
2015-04-11
February 2015
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 decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 2
MySQL
Replication
MySQL
Fabric
DRBD
Windows/S
olaris/Clust
erware
Clustering
or Oracle
VM
MySQL
Cluster
MySQL HA Solutions
19th February 2015
Getting Higher & Higher Availability
Copyright 2015, Oracle and/or its affiliates. All rights reserved 3
MySQL Cluster NDB Engine History
NDB
Engine
2003
………….
6.2GA
Sep2007
6.3GA
Jan2008
7.0GA
April2009
7.1GA
April2010
7.2GA
Based on
MySQL
5.5
Feb2012
7.3GA –
Based on
MySQL
5.6
June2013
7.4 GA
Feb 015
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 4
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Clients
Application /
MySQL Node Layer
Data Layer
Copyright 2015, oracle and/or its affiliates. All rights reserved 5
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Clients
Data Layer
Copyright 2015, oracle and/or its affiliates. All rights reserved 6
Application /
MySQL Node Layer
MySQL Cluster Scaling
MySQL Cluster Data Nodes
Clients
Application Layer
Data Layer
Copyright 2015, oracle and/or its affiliates. All rights reserved 7
On-line Operations
• Scale the cluster (add & remove nodes on-line)
• Repartition tables
• Upgrade / patch servers & OS
• Upgrade / patch MySQL Cluster
• Back-Up
• Evolve the schema on-line, in real-time
Copyright 2015, oracle and/or its affiliates. All rights reserved 8
MySQL Cluster Auto-Installer
• Fast configuration
• Auto-discovery
• Workload optimized
• Repeatable best practices
Specify
Workload
Auto-
Discover
Define
TopologyDeploy
Copyright 2015, oracle and/or its affiliates. All rights reserved 9
NoSQL Access to MySQL Cluster data
Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps
JPA
Cluster JPA
PHP Perl Python Ruby JDBC Cluster J JS Apache Memcached
MySQL JNI Node.JS mod_ndb ndb_eng
NDB API (C++)
MySQL Cluster Data Nodes
MySQL Cluster 7.4 GA
Copyright 2015, oracle and/or its affiliates. All rights reserved 11
MySQL Cluster 7.4 GA
• 200 Million NoSQL
Reads/Sec
• 2.5M SQL Ops/Sec
• 50% Faster Reads
• 40% Faster Mixed
Performance
• Active-Active
Geographic
Redundancy
• Conflict
Detection/Resolution
Active-Active
• 5X Faster
Maintenance Ops
• Detailed Reporting
Management
Copyright 2015, oracle and/or its affiliates. All rights reserved 12
Performance Enhancements
MySQL Cluster 7.4
50% Read-Only Increase
Copyright 2015, oracle and/or its affiliates. All rights reserved 13
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
64 128 192 256 320 384 448 512
Transaconspersecond
Threads
Sysbench R/W
7.4
7.3
7.2
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
64 128 192 256 320 384 448 512
Transaconpersecond
Threads
Sysbench RO
7.4
7.3
7.2
40% Read/Write Increase
• Memory optimized tables
– Durable
– Mix with disk-based tables
• Massively concurrent OLTP
• Distributed Joins for analytics
• Parallel table scans for non-indexed
searches
• MySQL Cluster 7.4 FlexAsych
– 200M NoSQL Reads/Second
14
MySQL Cluster 7.4 NoSQL Performance
200 Million NoSQL Reads/Second
Copyright 2015, oracle and/or its affiliates. All rights reserved
-
50,000,000
100,000,000
150,000,000
200,000,000
250,000,000
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
Readspersecond
Data Nodes
FlexAsync Reads
• Memory optimized tables
– Durable
– Mix with disk-based tables
• Massively concurrent OLTP
• Distributed Joins for analytics
• Parallel table scans for non-indexed
searches
• MySQL Cluster 7.4 DBT2 BM
– 2.5M SQL Statements/Second
16/04/2015 15
MySQL Cluster 7.4 SQL Performance
2.5M SQL Statements/Second
Copyright 2015, oracle and/or its affiliates. All rights reserved
-
500,000
1,000,000
1,500,000
2,000,000
2,500,000
3,000,000
2 4 6 8 10 12 14 16
SQLStatements/sec
Data Nodes
DBT2 SQL Statements per Second
• Asynchronous replication between
MySQL Clusters
• Active-Active
– Update anywhere
– Conflict detection
• Application notified through exception tables
• Can opt to have conflicts resolved
automatically
– Auto-conflict-resolution
• Conflicting transaction and dependent ones
are rolled-back
• No changes to application schema
Active-Active Geo-Replication
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 16
What is a conflict?
John.balance==$100 John.balance==$100
Spend $40 Add $100
$60
$200
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 17
John.balance-=$40
John.balance==$60
John.balance==$200
John.balance+= $100
John.balance==$200
John.balance==$60
• NDB$EPOCH2 and
NDB$EPOCH2_TRANS introduced
• Detects conflicting inserts/updates
• Entire transactions (and dependent
ones) rolled back
• All conflicts are handled before
switching primary
• Conflicting deletes
• Rolling back of transactions that
read conflicted data
February 2015 18
Handling of Conflicts – Extensions in MySQL Cluster 7.4
Copyright 2015, oracle and/or its affiliates. All rights reserved
• Primary stores logical timestamp (GCI)
against updated row
– Window for conflict opens
• GCI replicated with updated row to
Secondary
• The same row and GCI is replicated back
(reflected) from Secondary to Primary
after it has been applied
– Closing window for conflict
• Primary checks every event originating
from the Secondary to ensure it isn’t for a
‘conflictable’ row
Detecting Conflicts - Reflected GCI
John.balance==$100
John.balance-=$40
John.balance==$60
John.balance==$200
John.balance==$100
John.balance+= $100
John.balance==$200
John.balance==$60
Spend
$40
Add $100
$60
$200
Primary Secondary
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 19
How to Use Conflict Detection/Resolution
Decide which
tables need
protecting
For each table,
specify what to
do on conflicts
Just record in
exception table
Application or
DBA acts on
content
Rollback the
conflicting row
Rollback the
conflicting
transaction
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 20
Demo
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 21
simple1 (10)
simple2 (10)
simple3 (10)
simple1 (10)
simple2 (10)
simple3 (10)
simple1 (10) (13)
STOPPED
simple1 (10) (20)
simple2 (10)  (20)
simple3 (10) (20)
OK (no stop)
simple1 (10) (20)
simple2 (10)  (20)
simple3 (10) (20)
????
Exception
simple1 (13), simple2(10), simple3(20)
simple1 $EX(10->20), simple2$EX(10->20)
Started
simple1 (13), simple2(10), simple3(20)
simple1 (10) (20)
simple2 (10)  (20)
Rollback
MySQL Cluster 7.4 Restart Improvements
• Duration of long-running maintenance activities dominated by Data Node
restart times
• MySQL Cluster 7.4 = 5.5X faster restarts
• Benefits both nodal and rolling restarts
– Upgrades, add-node,…
• Benefits both SQL and NoSQL APIs
• Benefits both ”manual” a MySQL Cluster Manager operations
• Achieve 5x as much during a single maintenance window
Make Data Node Restarts Fast!
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 22
MySQL Cluster 7.4 Restart Improvements
• Verbose logging
– Task start/completion
– Data volumes
– Parallelism & Wait times
• NDBINFO for recent node restarts
• More documentation of stages
• Goal: Make analysis of a slow restart possible
– Determine cause; Detect patterns; Understand the impact of indexes, local
checkpoints etc.
Observability improvements
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 23
MySQL Cluster 7.4 – Enhanced memory reporting
• ndbinfo.memory_per_fragment memory usage information for each
fragment replica, for each table and index
• Allocated memory and how much of that is actually in use.
• Exposes
– Fragmentation of fixed and var-sized fragment pages
– Accurate Data and Index Memory use
– Comparison of Primary and Backup fragment usage
– Partitioning effectiveness
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 24
Enhanced Memory Reporting
mysql> CREATE DATABASE clusterdb;USE clusterdb;
mysql> CREATE TABLE simples (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=NDB;
mysql> select node_id AS node, fragment_num AS frag, fixed_elem_alloc_bytes alloc_bytes, fixed_elem_free_bytes AS
free_bytes, fixed_elem_free_rows AS spare_rows from memory_per_fragment where fq_name like '%simples%';
+------+------+-------------+------------+------------+
| node | frag | alloc_bytes | free_bytes | spare_rows |
+------+------+-------------+------------+------------+
| 1 | 0 | 131072 | 5504 | 172 |
| 1 | 2 | 131072 | 1280 | 40 |
| 2 | 0 | 131072 | 5504 | 172 |
| 2 | 2 | 131072 | 1280 | 40 |
| 3 | 1 | 131072 | 3104 | 97 |
| 3 | 3 | 131072 | 4256 | 133 |
| 4 | 1 | 131072 | 3104 | 97 |
| 4 | 3 | 131072 | 4256 | 133 |
+------+------+-------------+------------+------------+
See how much memory a table is using
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 25
Enhanced Memory Reporting
+------+------+-------------+------------+------------+
| node | frag | alloc_bytes | free_bytes | spare_rows |
+------+------+-------------+------------+------------+
| 1 | 0 | 131072 | 5504 | 172 |
| 1 | 2 | 131072 | 1280 | 40 |
| 2 | 0 | 131072 | 5504 | 172 |
| 2 | 2 | 131072 | 1280 | 40 |
| 3 | 1 | 131072 | 3104 | 97 |
| 3 | 3 | 131072 | 4256 | 133 |
| 4 | 1 | 131072 | 3104 | 97 |
| 4 | 3 | 131072 | 4256 | 133 |
+------+------+-------------+------------+------------+
mysql> DELETE FROM clusterdb.simples LIMIT 1;
+------+------+-------------+------------+------------+
| node | frag | alloc_bytes | free_bytes | spare_rows |
+------+------+-------------+------------+------------+
| 1 | 0 | 131072 | 5504 | 172 |
| 1 | 2 | 131072 | 1312 | 41 |
| 2 | 0 | 131072 | 5504 | 172 |
| 2 | 2 | 131072 | 1312 | 41 |
| 3 | 1 | 131072 | 3104 | 97 |
| 3 | 3 | 131072 | 4288 | 134 |
| 4 | 1 | 131072 | 3104 | 97 |
| 4 | 3 | 131072 | 4288 | 134 |
+------+------+-------------+------------+------------+
See how memory is made available after deleting rows
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 26
Enhanced Memory Reporting
mysql> CREATE TABLE simples (id INT NOT NULL AUTO_INCREMENT, species VARCHAR(20) DEFAULT "Human", PRIMARY KEY(id,
species)) engine=ndb PARTITION BY KEY(species);
// Add some data
mysql> select node_id AS node, fragment_num AS frag, fixed_elem_alloc_bytes alloc_bytes, fixed_elem_free_bytes AS free_bytes,
fixed_elem_free_rows AS spare_rows from ndbinfo.memory_per_fragment where fq_name like '%simples%';
+------+------+-------------+------------+------------+
| node | frag | alloc_bytes | free_bytes | spare_rows |
+------+------+-------------+------------+------------+
| 1 | 0 | 0 | 0 | 0 |
| 1 | 2 | 196608 | 11732 | 419 |
| 2 | 0 | 0 | 0 | 0 |
| 2 | 2 | 196608 | 11732 | 419 |
| 3 | 1 | 0 | 0 | 0 |
| 3 | 3 | 0 | 0 | 0 |
| 4 | 1 | 0 | 0 | 0 |
| 4 | 3 | 0 | 0 | 0 |
+------+------+-------------+------------+------------+
Check how well partitioned/sharded a table is
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 27
MySQL Cluster 7.4 – Enhanced activity reporting
• ndbinfo.operations_per_fragment activity counters for each fragment
replica, for each table and index
• PK & scan access – requests, bytes, rows…
• Exposes
– How traffic maps to tables and indices
– Query execution, use of indexes etc.
– LDM and node imbalances
– Hotspots and scan overloads
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 28
Exploring the new release
MySQL Cluster 7.4
Thank You
February 2015

More Related Content

What's hot (20)

PDF
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
 
PDF
MySQL Security
Mario Beck
 
ODP
MySQL Cluster
Abel Flórez
 
PDF
My sql crashcourse_2012
sqlhjalp
 
ODP
MySQL Enterprise Portfolio
Abel Flórez
 
PDF
MySQL Day Paris 2016 - State Of The Dolphin
Olivier DASINI
 
PDF
2012 ohiolinuxfest replication
sqlhjalp
 
PPTX
Christo kutrovsky oracle rac solving common scalability problems
Christo Kutrovsky
 
PPTX
Making MySQL highly available using Oracle Grid Infrastructure
Ilmar Kerm
 
PDF
MySQL for Software-as-a-Service (SaaS)
Mario Beck
 
PDF
Mysql nowwhat
sqlhjalp
 
PDF
MySQL Performance Best Practices
Olivier DASINI
 
PDF
My sql susecon_crashcourse_2012
sqlhjalp
 
PDF
2012 scale replication
sqlhjalp
 
PDF
Introduction to MySQL Cluster
Abel Flórez
 
PDF
2012 replication
sqlhjalp
 
PDF
MySQL 5.7 - What's new, How to upgrade and Document Store
Abel Flórez
 
PDF
MySQL 5.7 Replication News
Ted Wennmark
 
PDF
MySQL User Camp: MySQL Cluster
Shivji Kumar Jha
 
PDF
High-Availability using MySQL Fabric
Mats Kindahl
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
 
MySQL Security
Mario Beck
 
MySQL Cluster
Abel Flórez
 
My sql crashcourse_2012
sqlhjalp
 
MySQL Enterprise Portfolio
Abel Flórez
 
MySQL Day Paris 2016 - State Of The Dolphin
Olivier DASINI
 
2012 ohiolinuxfest replication
sqlhjalp
 
Christo kutrovsky oracle rac solving common scalability problems
Christo Kutrovsky
 
Making MySQL highly available using Oracle Grid Infrastructure
Ilmar Kerm
 
MySQL for Software-as-a-Service (SaaS)
Mario Beck
 
Mysql nowwhat
sqlhjalp
 
MySQL Performance Best Practices
Olivier DASINI
 
My sql susecon_crashcourse_2012
sqlhjalp
 
2012 scale replication
sqlhjalp
 
Introduction to MySQL Cluster
Abel Flórez
 
2012 replication
sqlhjalp
 
MySQL 5.7 - What's new, How to upgrade and Document Store
Abel Flórez
 
MySQL 5.7 Replication News
Ted Wennmark
 
MySQL User Camp: MySQL Cluster
Shivji Kumar Jha
 
High-Availability using MySQL Fabric
Mats Kindahl
 

Viewers also liked (14)

PPTX
Evaluation of media coursework
zaramcdermott
 
PDF
Hkosc group replication-lecture_lab07
Ivan Ma
 
PPTX
Reflection: Questions about theory/narrative
zaramcdermott
 
PPT
Conventions of a magazine advert
zaramcdermott
 
PPT
The General Conventions of Music Videos
zaramcdermott
 
PPTX
Props for music vid
zaramcdermott
 
PPTX
Evaluation Activity 1
zaramcdermott
 
PPTX
How did I use media technologies in the Evaluation? Question 4
zaramcdermott
 
PPTX
Evaluation task 4
zaramcdermott
 
PDF
20160821 coscup-my sql57docstorelab01
Ivan Ma
 
PDF
20151010 my sq-landjavav2a
Ivan Ma
 
PDF
20141011 my sql clusterv01pptx
Ivan Ma
 
PPTX
How to create a DigiPak
zaramcdermott
 
PDF
Junction PT1
Rintaro Takeda
 
Evaluation of media coursework
zaramcdermott
 
Hkosc group replication-lecture_lab07
Ivan Ma
 
Reflection: Questions about theory/narrative
zaramcdermott
 
Conventions of a magazine advert
zaramcdermott
 
The General Conventions of Music Videos
zaramcdermott
 
Props for music vid
zaramcdermott
 
Evaluation Activity 1
zaramcdermott
 
How did I use media technologies in the Evaluation? Question 4
zaramcdermott
 
Evaluation task 4
zaramcdermott
 
20160821 coscup-my sql57docstorelab01
Ivan Ma
 
20151010 my sq-landjavav2a
Ivan Ma
 
20141011 my sql clusterv01pptx
Ivan Ma
 
How to create a DigiPak
zaramcdermott
 
Junction PT1
Rintaro Takeda
 
Ad

Similar to Exploring mysql cluster 7.4 (20)

PDF
2_MySQL_Cluster_Introduction.pdf
Haiping Li
 
PPT
2010 12 mysql_clusteroverview
Dimas Prasetyo
 
PPTX
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
Andrew Morgan
 
PDF
MySQL Cluster
Mario Beck
 
PDF
MySQL Cluster as Transactional NoSQL (KVS)
Ryusuke Kajiyama
 
PDF
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
PDF
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
Andrew Morgan
 
PDF
Introduction to MySQL
Ted Wennmark
 
PPTX
What's new in MySQL Cluster 7.4 webinar charts
Andrew Morgan
 
PDF
MySQL NDB Cluster 8.0
Ted Wennmark
 
PDF
NoSQL and MySQL
Ted Wennmark
 
PDF
C:\fakepath\cluster 7 1
thingsandstuff
 
PDF
Breakthrough performance with MySQL Cluster (2012)
Frazer Clement
 
ODP
MySQL HA
Kris Buytaert
 
PDF
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
Olivier DASINI
 
PDF
MySQL Cluster overview + development slides (2014)
Frazer Clement
 
PPTX
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
Andrew Morgan
 
PDF
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
Bernd Ocklin
 
PDF
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 
PDF
Ndb cluster 80_requirements
mikaelronstrom
 
2_MySQL_Cluster_Introduction.pdf
Haiping Li
 
2010 12 mysql_clusteroverview
Dimas Prasetyo
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
Andrew Morgan
 
MySQL Cluster
Mario Beck
 
MySQL Cluster as Transactional NoSQL (KVS)
Ryusuke Kajiyama
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
Andrew Morgan
 
Introduction to MySQL
Ted Wennmark
 
What's new in MySQL Cluster 7.4 webinar charts
Andrew Morgan
 
MySQL NDB Cluster 8.0
Ted Wennmark
 
NoSQL and MySQL
Ted Wennmark
 
C:\fakepath\cluster 7 1
thingsandstuff
 
Breakthrough performance with MySQL Cluster (2012)
Frazer Clement
 
MySQL HA
Kris Buytaert
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
Olivier DASINI
 
MySQL Cluster overview + development slides (2014)
Frazer Clement
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
Andrew Morgan
 
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
Bernd Ocklin
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 
Ndb cluster 80_requirements
mikaelronstrom
 
Ad

More from Ivan Ma (13)

PDF
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 
PDF
20201106 hk-py con-mysql-shell
Ivan Ma
 
PDF
20200613 my sql-ha-deployment
Ivan Ma
 
PDF
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
PDF
20190817 coscup-oracle my sql innodb cluster sharing
Ivan Ma
 
PDF
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
PDF
20180420 hk-the powerofmysql8
Ivan Ma
 
PDF
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
PDF
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
PDF
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
PDF
20161029 py con-mysq-lv3
Ivan Ma
 
PDF
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
PDF
20150110 my sql-performanceschema
Ivan Ma
 
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 
20201106 hk-py con-mysql-shell
Ivan Ma
 
20200613 my sql-ha-deployment
Ivan Ma
 
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
20190817 coscup-oracle my sql innodb cluster sharing
Ivan Ma
 
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
20180420 hk-the powerofmysql8
Ivan Ma
 
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
20161029 py con-mysq-lv3
Ivan Ma
 
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
20150110 my sql-performanceschema
Ivan Ma
 

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 

Exploring mysql cluster 7.4

  • 1. Exploring the new release MySQL Cluster 7.4 In-Memory Real-Time Performance, Web Scalability & 99.999% Availability Ivan Ma [email protected] 2015-04-11 February 2015
  • 2. 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 2
  • 3. MySQL Replication MySQL Fabric DRBD Windows/S olaris/Clust erware Clustering or Oracle VM MySQL Cluster MySQL HA Solutions 19th February 2015 Getting Higher & Higher Availability Copyright 2015, Oracle and/or its affiliates. All rights reserved 3
  • 4. MySQL Cluster NDB Engine History NDB Engine 2003 …………. 6.2GA Sep2007 6.3GA Jan2008 7.0GA April2009 7.1GA April2010 7.2GA Based on MySQL 5.5 Feb2012 7.3GA – Based on MySQL 5.6 June2013 7.4 GA Feb 015 February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 4
  • 5. MySQL Cluster Architecture MySQL Cluster Data Nodes Clients Application / MySQL Node Layer Data Layer Copyright 2015, oracle and/or its affiliates. All rights reserved 5
  • 6. MySQL Cluster Architecture MySQL Cluster Data Nodes Clients Data Layer Copyright 2015, oracle and/or its affiliates. All rights reserved 6 Application / MySQL Node Layer
  • 7. MySQL Cluster Scaling MySQL Cluster Data Nodes Clients Application Layer Data Layer Copyright 2015, oracle and/or its affiliates. All rights reserved 7
  • 8. On-line Operations • Scale the cluster (add & remove nodes on-line) • Repartition tables • Upgrade / patch servers & OS • Upgrade / patch MySQL Cluster • Back-Up • Evolve the schema on-line, in real-time Copyright 2015, oracle and/or its affiliates. All rights reserved 8
  • 9. MySQL Cluster Auto-Installer • Fast configuration • Auto-discovery • Workload optimized • Repeatable best practices Specify Workload Auto- Discover Define TopologyDeploy Copyright 2015, oracle and/or its affiliates. All rights reserved 9
  • 10. NoSQL Access to MySQL Cluster data Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps JPA Cluster JPA PHP Perl Python Ruby JDBC Cluster J JS Apache Memcached MySQL JNI Node.JS mod_ndb ndb_eng NDB API (C++) MySQL Cluster Data Nodes
  • 11. MySQL Cluster 7.4 GA Copyright 2015, oracle and/or its affiliates. All rights reserved 11
  • 12. MySQL Cluster 7.4 GA • 200 Million NoSQL Reads/Sec • 2.5M SQL Ops/Sec • 50% Faster Reads • 40% Faster Mixed Performance • Active-Active Geographic Redundancy • Conflict Detection/Resolution Active-Active • 5X Faster Maintenance Ops • Detailed Reporting Management Copyright 2015, oracle and/or its affiliates. All rights reserved 12
  • 13. Performance Enhancements MySQL Cluster 7.4 50% Read-Only Increase Copyright 2015, oracle and/or its affiliates. All rights reserved 13 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 64 128 192 256 320 384 448 512 Transaconspersecond Threads Sysbench R/W 7.4 7.3 7.2 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 64 128 192 256 320 384 448 512 Transaconpersecond Threads Sysbench RO 7.4 7.3 7.2 40% Read/Write Increase
  • 14. • Memory optimized tables – Durable – Mix with disk-based tables • Massively concurrent OLTP • Distributed Joins for analytics • Parallel table scans for non-indexed searches • MySQL Cluster 7.4 FlexAsych – 200M NoSQL Reads/Second 14 MySQL Cluster 7.4 NoSQL Performance 200 Million NoSQL Reads/Second Copyright 2015, oracle and/or its affiliates. All rights reserved - 50,000,000 100,000,000 150,000,000 200,000,000 250,000,000 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 Readspersecond Data Nodes FlexAsync Reads
  • 15. • Memory optimized tables – Durable – Mix with disk-based tables • Massively concurrent OLTP • Distributed Joins for analytics • Parallel table scans for non-indexed searches • MySQL Cluster 7.4 DBT2 BM – 2.5M SQL Statements/Second 16/04/2015 15 MySQL Cluster 7.4 SQL Performance 2.5M SQL Statements/Second Copyright 2015, oracle and/or its affiliates. All rights reserved - 500,000 1,000,000 1,500,000 2,000,000 2,500,000 3,000,000 2 4 6 8 10 12 14 16 SQLStatements/sec Data Nodes DBT2 SQL Statements per Second
  • 16. • Asynchronous replication between MySQL Clusters • Active-Active – Update anywhere – Conflict detection • Application notified through exception tables • Can opt to have conflicts resolved automatically – Auto-conflict-resolution • Conflicting transaction and dependent ones are rolled-back • No changes to application schema Active-Active Geo-Replication February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 16
  • 17. What is a conflict? John.balance==$100 John.balance==$100 Spend $40 Add $100 $60 $200 February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 17 John.balance-=$40 John.balance==$60 John.balance==$200 John.balance+= $100 John.balance==$200 John.balance==$60
  • 18. • NDB$EPOCH2 and NDB$EPOCH2_TRANS introduced • Detects conflicting inserts/updates • Entire transactions (and dependent ones) rolled back • All conflicts are handled before switching primary • Conflicting deletes • Rolling back of transactions that read conflicted data February 2015 18 Handling of Conflicts – Extensions in MySQL Cluster 7.4 Copyright 2015, oracle and/or its affiliates. All rights reserved
  • 19. • Primary stores logical timestamp (GCI) against updated row – Window for conflict opens • GCI replicated with updated row to Secondary • The same row and GCI is replicated back (reflected) from Secondary to Primary after it has been applied – Closing window for conflict • Primary checks every event originating from the Secondary to ensure it isn’t for a ‘conflictable’ row Detecting Conflicts - Reflected GCI John.balance==$100 John.balance-=$40 John.balance==$60 John.balance==$200 John.balance==$100 John.balance+= $100 John.balance==$200 John.balance==$60 Spend $40 Add $100 $60 $200 Primary Secondary February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 19
  • 20. How to Use Conflict Detection/Resolution Decide which tables need protecting For each table, specify what to do on conflicts Just record in exception table Application or DBA acts on content Rollback the conflicting row Rollback the conflicting transaction February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 20
  • 21. Demo February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 21 simple1 (10) simple2 (10) simple3 (10) simple1 (10) simple2 (10) simple3 (10) simple1 (10) (13) STOPPED simple1 (10) (20) simple2 (10)  (20) simple3 (10) (20) OK (no stop) simple1 (10) (20) simple2 (10)  (20) simple3 (10) (20) ???? Exception simple1 (13), simple2(10), simple3(20) simple1 $EX(10->20), simple2$EX(10->20) Started simple1 (13), simple2(10), simple3(20) simple1 (10) (20) simple2 (10)  (20) Rollback
  • 22. MySQL Cluster 7.4 Restart Improvements • Duration of long-running maintenance activities dominated by Data Node restart times • MySQL Cluster 7.4 = 5.5X faster restarts • Benefits both nodal and rolling restarts – Upgrades, add-node,… • Benefits both SQL and NoSQL APIs • Benefits both ”manual” a MySQL Cluster Manager operations • Achieve 5x as much during a single maintenance window Make Data Node Restarts Fast! February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 22
  • 23. MySQL Cluster 7.4 Restart Improvements • Verbose logging – Task start/completion – Data volumes – Parallelism & Wait times • NDBINFO for recent node restarts • More documentation of stages • Goal: Make analysis of a slow restart possible – Determine cause; Detect patterns; Understand the impact of indexes, local checkpoints etc. Observability improvements February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 23
  • 24. MySQL Cluster 7.4 – Enhanced memory reporting • ndbinfo.memory_per_fragment memory usage information for each fragment replica, for each table and index • Allocated memory and how much of that is actually in use. • Exposes – Fragmentation of fixed and var-sized fragment pages – Accurate Data and Index Memory use – Comparison of Primary and Backup fragment usage – Partitioning effectiveness February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 24
  • 25. Enhanced Memory Reporting mysql> CREATE DATABASE clusterdb;USE clusterdb; mysql> CREATE TABLE simples (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=NDB; mysql> select node_id AS node, fragment_num AS frag, fixed_elem_alloc_bytes alloc_bytes, fixed_elem_free_bytes AS free_bytes, fixed_elem_free_rows AS spare_rows from memory_per_fragment where fq_name like '%simples%'; +------+------+-------------+------------+------------+ | node | frag | alloc_bytes | free_bytes | spare_rows | +------+------+-------------+------------+------------+ | 1 | 0 | 131072 | 5504 | 172 | | 1 | 2 | 131072 | 1280 | 40 | | 2 | 0 | 131072 | 5504 | 172 | | 2 | 2 | 131072 | 1280 | 40 | | 3 | 1 | 131072 | 3104 | 97 | | 3 | 3 | 131072 | 4256 | 133 | | 4 | 1 | 131072 | 3104 | 97 | | 4 | 3 | 131072 | 4256 | 133 | +------+------+-------------+------------+------------+ See how much memory a table is using February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 25
  • 26. Enhanced Memory Reporting +------+------+-------------+------------+------------+ | node | frag | alloc_bytes | free_bytes | spare_rows | +------+------+-------------+------------+------------+ | 1 | 0 | 131072 | 5504 | 172 | | 1 | 2 | 131072 | 1280 | 40 | | 2 | 0 | 131072 | 5504 | 172 | | 2 | 2 | 131072 | 1280 | 40 | | 3 | 1 | 131072 | 3104 | 97 | | 3 | 3 | 131072 | 4256 | 133 | | 4 | 1 | 131072 | 3104 | 97 | | 4 | 3 | 131072 | 4256 | 133 | +------+------+-------------+------------+------------+ mysql> DELETE FROM clusterdb.simples LIMIT 1; +------+------+-------------+------------+------------+ | node | frag | alloc_bytes | free_bytes | spare_rows | +------+------+-------------+------------+------------+ | 1 | 0 | 131072 | 5504 | 172 | | 1 | 2 | 131072 | 1312 | 41 | | 2 | 0 | 131072 | 5504 | 172 | | 2 | 2 | 131072 | 1312 | 41 | | 3 | 1 | 131072 | 3104 | 97 | | 3 | 3 | 131072 | 4288 | 134 | | 4 | 1 | 131072 | 3104 | 97 | | 4 | 3 | 131072 | 4288 | 134 | +------+------+-------------+------------+------------+ See how memory is made available after deleting rows February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 26
  • 27. Enhanced Memory Reporting mysql> CREATE TABLE simples (id INT NOT NULL AUTO_INCREMENT, species VARCHAR(20) DEFAULT "Human", PRIMARY KEY(id, species)) engine=ndb PARTITION BY KEY(species); // Add some data mysql> select node_id AS node, fragment_num AS frag, fixed_elem_alloc_bytes alloc_bytes, fixed_elem_free_bytes AS free_bytes, fixed_elem_free_rows AS spare_rows from ndbinfo.memory_per_fragment where fq_name like '%simples%'; +------+------+-------------+------------+------------+ | node | frag | alloc_bytes | free_bytes | spare_rows | +------+------+-------------+------------+------------+ | 1 | 0 | 0 | 0 | 0 | | 1 | 2 | 196608 | 11732 | 419 | | 2 | 0 | 0 | 0 | 0 | | 2 | 2 | 196608 | 11732 | 419 | | 3 | 1 | 0 | 0 | 0 | | 3 | 3 | 0 | 0 | 0 | | 4 | 1 | 0 | 0 | 0 | | 4 | 3 | 0 | 0 | 0 | +------+------+-------------+------------+------------+ Check how well partitioned/sharded a table is February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 27
  • 28. MySQL Cluster 7.4 – Enhanced activity reporting • ndbinfo.operations_per_fragment activity counters for each fragment replica, for each table and index • PK & scan access – requests, bytes, rows… • Exposes – How traffic maps to tables and indices – Query execution, use of indexes etc. – LDM and node imbalances – Hotspots and scan overloads February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 28
  • 29. Exploring the new release MySQL Cluster 7.4 Thank You February 2015