TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.
-
Upload
christopher-willingham -
Category
Documents
-
view
212 -
download
0
Transcript of TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.
![Page 1: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/1.jpg)
TONIGHT
Solomon Changproudly presents:
MySQL Clustering
Welcome to the UUASC LA Chapter
![Page 2: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/2.jpg)
NDB Cluster
High Availability* Shared-Nothing Architecture Redundancy
![Page 3: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/3.jpg)
Server Requirements
Any machine that can run MySQL
![Page 4: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/4.jpg)
Server Requirements
Any machine that can run MySQL
Non-Microsoft Operating System
![Page 5: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/5.jpg)
Server Requirements
Any machine that can run MySQL
Non-Microsoft Operating System
A buttload of RAM
![Page 6: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/6.jpg)
![Page 7: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/7.jpg)
Types of Nodes
Data Nodes ndbd
Management Nodes ndb_mgmd
API Nodes mysqld ndb_mgm
![Page 8: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/8.jpg)
![Page 9: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/9.jpg)
Bits and Pieces
Partition (AKA Fragment) A portion of a table
Replica A copy of a Partition
Node Group A collection of individual data nodes
![Page 10: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/10.jpg)
![Page 11: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/11.jpg)
![Page 12: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/12.jpg)
![Page 13: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/13.jpg)
![Page 14: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/14.jpg)
![Page 15: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/15.jpg)
Security of Nodes
![Page 16: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/16.jpg)
Security of Nodes
Authentication: None
![Page 17: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/17.jpg)
Security of Nodes
Authentication: None Encryption: None
![Page 18: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/18.jpg)
Security of Nodes
Authentication: None Encryption: None Management and Data Nodes
are very trusting as to who or what connects to them
![Page 19: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/19.jpg)
![Page 20: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/20.jpg)
![Page 21: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/21.jpg)
Transports
Gigabit Ethernet Bare recommended minimum
SCI Scalable Coherent Interconnect
Infiniband
![Page 22: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/22.jpg)
Performance
Primary Key are hashes
![Page 23: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/23.jpg)
Performance
Primary Key are hashes Hashed values determine which rows
are distributed to which data nodes
![Page 24: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/24.jpg)
Performance
Primary Key are hashes Hashed values determine which rows
are distributed to which data nodes Pushdown
![Page 25: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/25.jpg)
Performance
Primary Key are hashes Hashed values determine which rows
are distributed to which data nodes Pushdown
Spreading query work across multiple data nodes
set engine_condition_pushdown = 1
![Page 26: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/26.jpg)
Data Node Setup
In /etc/my.cnf:[MYSQLD]
ndbcluster
ndb-connectstring=10.0.0.152
[MYSQL_CLUSTER]
ndb-connectstring=10.0.0.152
![Page 27: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/27.jpg)
Management Node Setup
config.ini sections [ndbd] [ndb_mgmd] [mysqld]
![Page 28: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/28.jpg)
Management Node Setup
config.ini sections [ndbd] [ndb_mgmd] [mysqld]
Sections can be blank
![Page 29: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/29.jpg)
Management Node Setup
config.ini sections [ndbd] [ndb_mgmd] [mysqld]
Sections can be blank There can be multiple instances
of a section
![Page 30: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/30.jpg)
SQL Node Setup
Just like the Data Node Setup
In /etc/my.cnf:[MYSQLD]
ndbcluster
ndb-connectstring=10.0.0.152
[MYSQL_CLUSTER]
ndb-connectstring=10.0.0.152
![Page 31: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/31.jpg)
SQL Node Setup
The Management Node already knows this is a SQL node from its config.ini file
![Page 32: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/32.jpg)
Enough Talking
It's showtime
![Page 33: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/33.jpg)
Cluster Replication
Cluster replication is exactly the same as regular MySQL replication, with the exception of the Binary Log Injection Thread.
![Page 34: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/34.jpg)
![Page 35: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/35.jpg)
Backup and Restoration
Why would a fault-tolerant, completely redundant system would ever need to have a backup for restoring data?
![Page 36: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/36.jpg)
Disk-Based NDB Cluster
![Page 37: TONIGHT Solomon Chang proudly presents: MySQL Clustering Welcome to the UUASC LA Chapter.](https://reader035.fdocuments.us/reader035/viewer/2022070308/551c1dc9550346a84f8b59e1/html5/thumbnails/37.jpg)
HA Caveat
SQL Nodes