SlideShare une entreprise Scribd logo
1  sur  38
MySQL Cluster Trainingpresented by severalnines.com Address: c/o Severalnines AB SICS, Box 1263 Isafjordsgatan22 SE-164-29 Kista Contact: Jean-Jérôme Schmidt Email: services@severalnines.com
Introduction At Severalnines, we believe in sharing information and knowledge; we all come from an open source background We know a lot of things about MySQL Cluster and think that MySQL Cluster is a great technology These free MySQL Cluster Training slides are a contribution of ours to the knowledge and information sharing that’s common practice in the open source community If you have any questions on these slides or would like to book an actual training class, please contact us at: services@severalnines.com
Training Slides - Concept Over the coming weeks we will be chronologically releasing slides for the different sections of our MySQL Cluster Training program on our website. The full agenda of the training with all of its modules is outlined in the next slides so that you can see what topics will be covered over the coming weeks. Particularly specialised topics such as Cluster/J or NDB API are not fully covered in the slides. We recommend our instructor-led training classes for such topics.  Please contact us for more details: services@severalnines.com
Full Training Agenda (1/4) MySQL Cluster Introduction MySQL eco system Scale up, scale out, and sharding MySQL Cluster Architecture Use cases Features Node types and Roles Detailed Concepts Data Distribution Verifying data distribution Access Methods Partitioning Node failures and failure detection Network Partitioning Transactions and Locking Consistency Model Redo logging and Checkpointing
Agenda (2/4) Installing MySQL Cluster Setting up MySQL Cluster Starting/stopping nodes Recovery and restarts Upgrading configuration Upgrading Cluster Performance Tuning (instructor-led only; contact us at services@severalnines.com) Differences compared to Innodb/MyISAM Designing efficient and fast applications Identifying bottlenecks Tweaking configuration (OS and MySQL Cluster) Query Tuning Schema Design Index Tuning
Agenda (3/4) Management and Administration Backup and Restore Geographical Replication Online and offline operations Ndbinfo tables Reporting Single user mode Scaling Cluster Disk Data Use cases Limitations Best practice configuration Designing a Cluster Capacity Planning and Dimensioning Hardware recommendations Best practice Configuration Storage calculations
Agenda (4/4) Resolving Issues Common problems Error logs and Tracefiles Recovery and Escalation procedures Connectivity Overview NDBAPI Cluster/J LDAP Severalnines Tools Monitoring and Management Benchmarking Sandboxes Configuration and capacity planning Conclusion
Agenda: Lab Exercises(only applicable to instructor-led training classes) Lab Exercises Installing and Loading data into MySQL Cluster Starting/stopping nodes, recovery Query tuning Backup and Restore Configuration Upgrade Would you like to try something particular? This is possible too, speak with your instructor
Prerequisites Readers / Participants have understanding of SQL and basic database concepts.  Laptops/PCs for hands-on exercises Linux: 1GB RAM Windows: 2GB RAM Approx. 20GB disk space and Virtualbox installed.  Virtualbox can be downloaded for free at http://www.virtualbox.org/wiki/Downloads MySQL Cluster version 7.1 or later
Week 1 – Training SlidesSection 1: MySQL Cluster Introduction
Topics Origins of MySQL Cluster  Scale up, scale out, and sharding MySQL Cluster Architecture Use cases Features Node types and Roles
Origins of MySQL Cluster Ericsson started development of NDB Cluster in 1996 Focus on HA/performance requirements of Telecom Offered as a product in 2001 by Alzato, fully owned by Ericsson Acquisition by MySQL in September 2003 Core team is transferred  Intellectual Property transferred (9 patents) New product called MySQL Cluster  Original NDB Cluster + SQL engine + MySQL connectors   Major investment in usability Co-developed with some telecom vendors
Telco-grade Data Management High Availability 99.999% (< 5 mins/yr) or 99.9999% (< 30 secs/yr) Scalability Throughput in the range of 1000s or 10,000s per second Predictable Real-time Performance Typically 5 to 10 milliseconds In-memory performance Cost effective  ScaleOut vs. ScaleUp COTS hardware
Scale up, scale out, sharding Scale up means having one beefy machine handling load. At some point it won’t scale Depending on implementation, mutexes and semaphores these systems scales up to about 16 processors/cores. With the MySQL Server you will be limited by the number of incoming connections at some stage. Hard to increase the capacity Reconfigure with more cores Examples Sybase. Customer has a Sun E10000, next step is to get a Sun E15000, and then license cost for additional processors Gets expensive. Scale up is old school.
Scale up, scale out, sharding Scale-out means that instead of using one beefy machine you use many. This can be accomplished with MySQL Replication Master -> slave replication Pros: easy to add slaves Cons: Write scaling is hard, one single master, read/write split MySQL Cluster Will be addressed in this training. Read Read/writes Asynch. replication Read
Scale up, scale out, sharding Shardingmeans that instead of using one beefy machine you use many and partitions the data on the machines. Problems: Hard do find a good key to partition by Adding nodes are hard – how to redistribute the data? MySQL Cluster addresses a lot of these problems Sharding Aware Layer in Application Code Users1-1000 Users1001-2000 Users2001-3000
Application R/I/U/D Application R/I/U/D Application R/I/U/D Java, C++, LDAP Application R/I/U/D MySQL Cluster Architecture Native API DATANODE DATANODE Management Server Management Server DATANODE DATANODE
[object Object]
Shared-nothing architecture
Data partitioned across nodes
In a RAID10 fashion
Redundancy
Synchronous replication
Automatic failover and repair
Performance
Ability to mix and match disk and memory tables
Different access methods (SQL, C++, Java,LDAP)  MySQL Cluster basics
[object Object]
Any node can fail without affecting the system
Configurable number of data copies
Up to 4 copies
Synchronous replication
Automatic failure detection and failover
Detection time determined by heartbeat
Failover is instantaneous
Automatic resynchronization
Delta or Full synchronizationAvailability Features (1/2)
[object Object]

Contenu connexe

Plus de Severalnines

Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudSeveralnines
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsSeveralnines
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSeveralnines
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...Severalnines
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBSeveralnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlSeveralnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Severalnines
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBSeveralnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerSeveralnines
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifeSeveralnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLSeveralnines
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningSeveralnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBSeveralnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Severalnines
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilitySeveralnines
 
Webinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementWebinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementSeveralnines
 

Plus de Severalnines (20)

Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 
Webinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementWebinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database Management
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

Severalnines Self-Training: MySQL® Cluster - Part I

  • 1. MySQL Cluster Trainingpresented by severalnines.com Address: c/o Severalnines AB SICS, Box 1263 Isafjordsgatan22 SE-164-29 Kista Contact: Jean-Jérôme Schmidt Email: services@severalnines.com
  • 2. Introduction At Severalnines, we believe in sharing information and knowledge; we all come from an open source background We know a lot of things about MySQL Cluster and think that MySQL Cluster is a great technology These free MySQL Cluster Training slides are a contribution of ours to the knowledge and information sharing that’s common practice in the open source community If you have any questions on these slides or would like to book an actual training class, please contact us at: services@severalnines.com
  • 3. Training Slides - Concept Over the coming weeks we will be chronologically releasing slides for the different sections of our MySQL Cluster Training program on our website. The full agenda of the training with all of its modules is outlined in the next slides so that you can see what topics will be covered over the coming weeks. Particularly specialised topics such as Cluster/J or NDB API are not fully covered in the slides. We recommend our instructor-led training classes for such topics. Please contact us for more details: services@severalnines.com
  • 4. Full Training Agenda (1/4) MySQL Cluster Introduction MySQL eco system Scale up, scale out, and sharding MySQL Cluster Architecture Use cases Features Node types and Roles Detailed Concepts Data Distribution Verifying data distribution Access Methods Partitioning Node failures and failure detection Network Partitioning Transactions and Locking Consistency Model Redo logging and Checkpointing
  • 5. Agenda (2/4) Installing MySQL Cluster Setting up MySQL Cluster Starting/stopping nodes Recovery and restarts Upgrading configuration Upgrading Cluster Performance Tuning (instructor-led only; contact us at services@severalnines.com) Differences compared to Innodb/MyISAM Designing efficient and fast applications Identifying bottlenecks Tweaking configuration (OS and MySQL Cluster) Query Tuning Schema Design Index Tuning
  • 6. Agenda (3/4) Management and Administration Backup and Restore Geographical Replication Online and offline operations Ndbinfo tables Reporting Single user mode Scaling Cluster Disk Data Use cases Limitations Best practice configuration Designing a Cluster Capacity Planning and Dimensioning Hardware recommendations Best practice Configuration Storage calculations
  • 7. Agenda (4/4) Resolving Issues Common problems Error logs and Tracefiles Recovery and Escalation procedures Connectivity Overview NDBAPI Cluster/J LDAP Severalnines Tools Monitoring and Management Benchmarking Sandboxes Configuration and capacity planning Conclusion
  • 8. Agenda: Lab Exercises(only applicable to instructor-led training classes) Lab Exercises Installing and Loading data into MySQL Cluster Starting/stopping nodes, recovery Query tuning Backup and Restore Configuration Upgrade Would you like to try something particular? This is possible too, speak with your instructor
  • 9. Prerequisites Readers / Participants have understanding of SQL and basic database concepts. Laptops/PCs for hands-on exercises Linux: 1GB RAM Windows: 2GB RAM Approx. 20GB disk space and Virtualbox installed. Virtualbox can be downloaded for free at http://www.virtualbox.org/wiki/Downloads MySQL Cluster version 7.1 or later
  • 10. Week 1 – Training SlidesSection 1: MySQL Cluster Introduction
  • 11. Topics Origins of MySQL Cluster Scale up, scale out, and sharding MySQL Cluster Architecture Use cases Features Node types and Roles
  • 12. Origins of MySQL Cluster Ericsson started development of NDB Cluster in 1996 Focus on HA/performance requirements of Telecom Offered as a product in 2001 by Alzato, fully owned by Ericsson Acquisition by MySQL in September 2003 Core team is transferred Intellectual Property transferred (9 patents) New product called MySQL Cluster Original NDB Cluster + SQL engine + MySQL connectors Major investment in usability Co-developed with some telecom vendors
  • 13. Telco-grade Data Management High Availability 99.999% (< 5 mins/yr) or 99.9999% (< 30 secs/yr) Scalability Throughput in the range of 1000s or 10,000s per second Predictable Real-time Performance Typically 5 to 10 milliseconds In-memory performance Cost effective ScaleOut vs. ScaleUp COTS hardware
  • 14. Scale up, scale out, sharding Scale up means having one beefy machine handling load. At some point it won’t scale Depending on implementation, mutexes and semaphores these systems scales up to about 16 processors/cores. With the MySQL Server you will be limited by the number of incoming connections at some stage. Hard to increase the capacity Reconfigure with more cores Examples Sybase. Customer has a Sun E10000, next step is to get a Sun E15000, and then license cost for additional processors Gets expensive. Scale up is old school.
  • 15. Scale up, scale out, sharding Scale-out means that instead of using one beefy machine you use many. This can be accomplished with MySQL Replication Master -> slave replication Pros: easy to add slaves Cons: Write scaling is hard, one single master, read/write split MySQL Cluster Will be addressed in this training. Read Read/writes Asynch. replication Read
  • 16. Scale up, scale out, sharding Shardingmeans that instead of using one beefy machine you use many and partitions the data on the machines. Problems: Hard do find a good key to partition by Adding nodes are hard – how to redistribute the data? MySQL Cluster addresses a lot of these problems Sharding Aware Layer in Application Code Users1-1000 Users1001-2000 Users2001-3000
  • 17. Application R/I/U/D Application R/I/U/D Application R/I/U/D Java, C++, LDAP Application R/I/U/D MySQL Cluster Architecture Native API DATANODE DATANODE Management Server Management Server DATANODE DATANODE
  • 18.
  • 21. In a RAID10 fashion
  • 26. Ability to mix and match disk and memory tables
  • 27. Different access methods (SQL, C++, Java,LDAP) MySQL Cluster basics
  • 28.
  • 29. Any node can fail without affecting the system
  • 30. Configurable number of data copies
  • 31. Up to 4 copies
  • 37. Delta or Full synchronizationAvailability Features (1/2)
  • 38.
  • 41. Supports upgrades and downgrade of system without outages
  • 43. Geographical Replication using Asynchronous protocol
  • 44. Online Backup Availability Features (2/2)
  • 45. Use Cases Good fit OLTP apps with short running queries Application with real-time characteristics and requirements A lot of concurrent requests Write intensive applications Typically the following are a poor fit: Heavy reporting type (OLAP) Data Warehouse Complex JOINs (much improved in 7.2) scale badly. A couple of tables and with about 1000 records meeting the JOIN criteria is just fine) Complex and long running transactions in a realtime system is just wrong. However, replicate from MySQL Cluster to regular MySQL (innodb) which runs the reporting.
  • 46. Application R/I/U/D Application R/I/U/D Application R/I/U/D Java, C++, LDAP Application R/I/U/D MySQL Cluster Architecture Native API DATANODE DATANODE Management Server Management Server DATANODE DATANODE
  • 47. Node Types and Roles MySQL Cluster is comprised of the following node types: Management Nodes Maintains the cluster configuration Involved in handling network partitioning Writes a cluster log containing events occurring in Cluster. Typically two are deployed for redundancy Data Nodes Transaction, query handling and data storage Atleast two for redundancy Application Nodes Mysql server, Cluster/J Requests are ultimately converted to NDBAPI calls
  • 48. Starting a MySQL Cluster Pretend that we have four hosts: app01 app02 storage01 storage02 We will start a HA cluster consisting of four nodes: 2 data nodes, one each on storage01 and storage02 2 mysql servers to access the data nodes, one on each of app01 and app02 2 management servers to deal with configuration and network partitioning, one of each on app01 and app02.
  • 49. Management Nodes/Servers Owns the Cluster configuration and loads a file called config.ini. Config.ini describes the Cluster Number of management nodes, data nodes access (mysql/ndbapi) nodes Ports, Resources, Data Directories The management node is started with ndb_mgmd –f /etc/mysql/config.ini --configdir=/etc/mysql The management server generates a binary versioned configuration file that is stored in configdir. All nodes must first connect to the management nodes to fetch the configuration Listens by default on port 1186 Writes a cluster log in Datadir (e.gDatadir=/data/)
  • 50. MySQLClusterTwo management servers are started The management servers loads in the config.ini file. Compare with each other they have the same version. If not, they won’t start. The management servers start writing a cluster log Ndb_X_cluster.log Located in the datadir. Hostname=app01datadir=/data/Listens on *:1186 Hostname=app02datadir=/data/Listens on *:1186 Management Server1 Management Server2 Compareconfig app01> ndb_mgmd –f /etc/mysql/config.ini –configdir=/etc/mysql --reload app02> ndb_mgmd –f /etc/mysql/config.ini –configdir=/etc/mysql --reload
  • 51. Data Nodes Connects to the management nodes and fetch the configuration Needs a connectstring pointing to the management nodes The data nodes are the processes Storing data Managing transaction, indexing, data distribution etc etc. When the data node gets the configuration it will try and setup connections to other nodes. Started with ndbd –c “hostname1:1186,hostname2:1186” ndbmtd –c “hostname1:1186,hostname2:1186” Ndbmtd is the multithreaded daemon and can use up to 8 cores. Ndbd is for single/dual core machines.
  • 52. MySQL ClusterData Node 1 Joins Hostname=app01datadir=/data/Listens on *:1186 Hostname=app02datadir=/data/Listens on *:1186 Hostname=storage01datadir=/data/ Management Server1 Management Server2 DATANODE1 Get config Starts listening for other data node storage01> ndbd –c “app01:1186,app02:1186”
  • 53. MySQL ClusterData Node 2 Joins Hostname=app01datadir=/data/Listens on *:1186 Hostname=app02datadir=/data/Listens on *:1186 Hostname=storage01datadir=/data/ Management Server1 Management Server2 DATANODE1 Get config Hostname=storage01datadir=/data/ DATANODE1 storage02> ndbd –c “app01:1186,app02:1186”
  • 54. API Nodes NDBAPI programs Direct API (no SQL) C++ programs, uses libndbclient Cluster/J Java, has a JNI interface that uses libndbclient MySQL nodes/server Convert SQL into NDBAPI code Uses libndbclient Stores data/logs in a data directory Configuration for the server in a my.cnf file In any case A connectstring is a always needed pointing to the management nodes.
  • 55. MySQL ClusterA MySQL Server Joins Get config Hostname=app01datadir=/data/Listens on *:1186 Hostname=app02datadir=/data/Listens on *:1186 Hostname=storage01datadir=/data/ Hostname=app03datadir=/data/ Management Server1 Management Server2 DATANODE1 Hostname=storage01datadir=/data/ DATANODE1 app03> mysqld &
  • 56. MySQL ClusterA MySQL Server Joins Hostname=app01datadir=/data/Listens on *:1186 Hostname=app02datadir=/data/Listens on *:1186 Hostname=storage01datadir=/data/ Hostname=app03datadir=/data/ Management Server1 Management Server2 DATANODE1 Hostname=storage01datadir=/data/ DATANODE1 app03> mysqld &
  • 57. MySQL ClusterFullystarted Hostname=app01datadir=/data/mysqlclusterListens on *:1186 Hostname=app02datadir=/data/mysqlclusterListens on *:1186 Hostname=storage01datadir=/data/mysqlcluster Hostname=app01datadir=/data/mysql Management Server1 Management Server2 DATANODE1 Hostname=storage01datadir=/data/mysqlcluster Hostname=app02datadir=/data/mysql DATANODE1
  • 58. Fully Connected All data nodes are connected to every other node Epoll is used Max 255 Nodes in the Cluster Max 48 Data Nodes Biggest Deployed Cluster 48 data nodes
  • 59. Coming next in week 2:Section 2: Detailed Concepts
  • 60. Topics covered in Week 2 Data Distribution Verifying data distribution Access Methods Partitioning Node failures and failure detection Network Partitioning Transactions and Locking Consistency Model Redo logging and Checkpointing
  • 61. We hope these training slides are useful to you!Please visit our website to view the next section of this training.For any questions, comments, feedback or to book a training class, please contact us at: services@severalnines.comThank you!
  • 62. Disclaimer © Copyright 2011 Severalnines AB. All rights reserved. Severalnines and the Severalnineslogo(s) are trademarks of Severalnines AB. MySQL is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Notes de l'éditeur

  1. Severalnines has been offering its products free of charge since 2007, while the founders were employed at MySQL. These products are the de-facto standard tools to assist MySQL customers and users in deploying their MySQL clusters. More information about Severalnines at www.severalnines.com