Oreilly Webcast Jun17

16
Step-by-step MySQL Clustering Setup Presented by Sean Hull, a business and technology consultant, author & speaker

description

 

Transcript of Oreilly Webcast Jun17

Page 1: Oreilly Webcast Jun17

Step-by-step MySQL Clustering Setup

Step-by-step MySQL Clustering Setup

Presented by Sean Hull, a business and technology

consultant, author & speaker

Presented by Sean Hull, a business and technology

consultant, author & speaker

Page 2: Oreilly Webcast Jun17

Cluster Sandbox SetupCluster Sandbox Setup

Download standbox - severalnines.com Unpackage sandbox Download cluster mysql distro Use dist-tgz.sh to expand cluster distro Run bootstrap.sh Run start-cluster-initial.sh Set PATH variable

Download standbox - severalnines.com Unpackage sandbox Download cluster mysql distro Use dist-tgz.sh to expand cluster distro Run bootstrap.sh Run start-cluster-initial.sh Set PATH variable

Page 3: Oreilly Webcast Jun17

MySQL Cluster - WhatMySQL Cluster - What

NDB storage engine mysqld - ports 3306, 3307

Sql servers, private InnoDB & MyISAM tables

ndbd - port 1186 Cluster nodes, port 1186

ndb_mgmd Monitor cluster nodes, start, stop, read

conf

NDB storage engine mysqld - ports 3306, 3307

Sql servers, private InnoDB & MyISAM tables

ndbd - port 1186 Cluster nodes, port 1186

ndb_mgmd Monitor cluster nodes, start, stop, read

conf

Page 4: Oreilly Webcast Jun17

NDB Cluster DiagramNDB Cluster Diagram

QuickTime™ and a decompressor

are needed to see this picture.

Page 5: Oreilly Webcast Jun17

ManagementManagement

Start ndb_mgm -e "all start"

Stop ndb_mgm -e "all stop"

Status ndb_mgm -e "all status"

Start ndb_mgm -e "all start"

Stop ndb_mgm -e "all stop"

Status ndb_mgm -e "all status"

Page 6: Oreilly Webcast Jun17

ConfigurationConfiguration

my.cnf ndbcluster ndb-connectstring=localhost:1186

config.ini [NDB_MGMD]

Id PortNumber Hostname

my.cnf ndbcluster ndb-connectstring=localhost:1186

config.ini [NDB_MGMD]

Id PortNumber Hostname

Page 7: Oreilly Webcast Jun17

PerformancePerformance

Slow performance w/large transactions

Slow performance of joins Slow performance of range scans

Slow performance w/large transactions

Slow performance of joins Slow performance of range scans

Page 8: Oreilly Webcast Jun17

LimitationsLimitations

Db size limited to available memory No text or blob datatypes No fulltext indexes No temporary tables Only read-committed transactions No “durability” of commits (backups!) No foreign keys supported No deadlock detection Reads are locking!

Db size limited to available memory No text or blob datatypes No fulltext indexes No temporary tables Only read-committed transactions No “durability” of commits (backups!) No foreign keys supported No deadlock detection Reads are locking!

Page 9: Oreilly Webcast Jun17

NDB Join TestNDB Join Test

Create table t - 5000 rows Create myisam_a and myisam_b Insert 5000 rows in each from t Create innodb_a and innodb_b Insert 5000 rows in each from t Create ndb_a and ndb_b Insert 5000 rows in each from t

Create table t - 5000 rows Create myisam_a and myisam_b Insert 5000 rows in each from t Create innodb_a and innodb_b Insert 5000 rows in each from t Create ndb_a and ndb_b Insert 5000 rows in each from t

Page 10: Oreilly Webcast Jun17

Performance DifferencesPerformance Differences

Three different insert times Three identical join queries Three different execution times

Three different insert times Three identical join queries Three different execution times

Page 11: Oreilly Webcast Jun17

Expert CommentsExpert Comments

Quote from High Performance MySQL

Quote from High Performance MySQL

Page 12: Oreilly Webcast Jun17

Further Reading - BooksFurther Reading - Books

High Performance MySQL 2nd Ed. - Schwartz,Zaitsev, Tkachenko, Zawodny, Lentz, Balling - O’Reilly

Pro MySQL - Kruckenberg & Pipes - Apress

High Performance MySQL 2nd Ed. - Schwartz,Zaitsev, Tkachenko, Zawodny, Lentz, Balling - O’Reilly

Pro MySQL - Kruckenberg & Pipes - Apress

Page 13: Oreilly Webcast Jun17

Further Reading - WebFurther Reading - Web

Video: Googly MySQL - Stewart Smith

Johan Andersson’s Cluster & HA Blog

Video: Googly MySQL - Stewart Smith

Johan Andersson’s Cluster & HA Blog

Page 14: Oreilly Webcast Jun17

ConclusionConclusion

Unique take on database clustering

Consider features/limiations Test, test & test some more Future looks bright for NDB Cluster

Unique take on database clustering

Consider features/limiations Test, test & test some more Future looks bright for NDB Cluster

Page 15: Oreilly Webcast Jun17

QuestionsQuestions

Cluster w/Master + Slave Replication

UTF8 & UTF16 issues

Cluster w/Master + Slave Replication

UTF8 & UTF16 issues

Page 16: Oreilly Webcast Jun17

Thank YouThank You

Sean Hull <[email protected]> Founder, Senior Consultant Heavyweight Internet Group www.iheavy.com Ph: +1-866-268-9448 Blog: www.oracleopensource.com www.linkedin.com/in/hullsean

Sean Hull <[email protected]> Founder, Senior Consultant Heavyweight Internet Group www.iheavy.com Ph: +1-866-268-9448 Blog: www.oracleopensource.com www.linkedin.com/in/hullsean