More Related Content
Similar to Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster (20)
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
- 1. 1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
- 3. Aim of This Hands-on Lab
Getting Started with MySQL Cluster
§ Objectives
1 Learn the basics of the MySQL Cluster Architecture
2 Learn the basics of MySQL Cluster Configuration and Administration
3 Learn how to start a new Cluster for evaluation purposes and how to
connect to it
§ Benefits
– Familiarize with MySQL Cluster
– Know where to go next to start (or continue) Cluster evaluation
3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 4. Agenda
1 Brief Introduction to MySQL Cluster
2 Installation, Start & Monitoring of MySQL Cluster Hands-on Lab
3 Connecting to MySQL Cluster Hands-on Lab
4 Safe Shutdown of MySQL Cluster
5 Overview of Main MySQL Cluster's Admin Commands & Operations
6 NDB API & JAVA Examples Hands-on Lab
7 MySQL Cluster CGE & Conclusions
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 5. Oracle Linux
Fast, Modern, Reliable
§ Open Source, available under the GNU GPL
§ Unbreakable Enterprise Kernel:
– Optimized for Oracle Hardware & Software
– Extreme Performance, Scalability & Reliability
– Optimizations, Enhancements & Bug Fixes More:
www.oracle.com/linux
§ 24/7 Oracle Linux Support in 145 Countries
– Zero downtime updates with Ksplice
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 6. It's Your Turn!
Download and Open the HOL Instructions:
$ wget dl.dropbox.com/u/11440784/hol/HOL_Instructions.txt
$ gedit HOL_Instructions.txt &
Main point
Hands-on LAB
6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 7. 1. Brief Introduction to
MySQL Cluster
7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 8. MySQL Cluster - WHAT
Web Scalability, Carrier Grade Availability, Developer Agility
§ Write-Scalable, Real-time, ACID-compliant Transactional DB
§ Auto-Sharding, Multi-Master, Shared-nothing Architecture:
– Independent nodes that can scale horizontally on commodity hardware
– No shared disks, no shared memory, No single point of failure
§ 99.999% Availability
§ Can be access by SQL and NoSQL Clients
§ Open source (Community Ed.) & Commercial (Carrier Grade Ed.)
8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 9. MySQL Cluster Deployments - WHERE
Where is it used?
Web Telecoms
●
High volume OLTP • Subscriber Databases (HLR & HSS)
●
Ecommerce (inventory management, • Service Delivery Platforms
shopping carts, payment processing, • Mobile & Micro-Payments
fulfillment tracking, etc)
• Communications & Presence Services
●
User Profile Management & Entitlements
• VoIP, IPTV, Video on Demand, Video
●
Session Management & Caching Conferencing
●
Feed Streaming, Analysis & Recomend. • IP Multimedia (IMS) Services
●
Content Management & Delivery • DNS / DHCP for Broadband Access
●
Massively Multiplayer Online Games
Case Studies: www.mysql.com/customers/cluster/
9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 10. MySQL Cluster Applications - WHEN
Is it suitable for me?
§ What are the consequences of a downtime of your Service?
§ Are you considering sharding your database to scale write performance?
– How does that impact your application and developers?
§ Do your services need to be real-time?
§ Will your services have unpredictable scalability demands, especially for
writes?
§ Do you want the flexibility to manage your data with more than just SQL?
10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 11. MySQL Cluster
Servicing the Most Performance-Intensive Workloads
11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 12. MySQL Cluster Architecture - HOW
Node Types:
§ Management Nodes
– Read the Configuration
– Logs, Administration
§ Data Nodes
– Store Data & Indexes
§ API Nodes
– External Connectivity
– NDB Storage Engine, APIs,
Connectors
12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 14. MySQL Cluster
Questions?
WHAT
WHERE
WHEN
HOW
WHO
14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 15. 2. Installation, Start &
Monitoring of MySQL Cluster
15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 16. Installation of MySQL Cluster
Generic Linux Package
Unpack of the Installation of two SQL
package Nodes
1 2 3 4
Creation of the needed Creation of the
directories configuration files
16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 17. It's Your Turn!
Execute The Commands at Section # 1 of the HOL Instructions
Main point
Hands-on LAB
17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 18. Start of MySQL Cluster
Ordered Start of the Nodes
Management Server SQL Nodes (two)
1 2 3
Data Nodes (two)
18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 19. It's Your Turn!
Execute The Commands at Section # 2 of the HOL Instructions
Main point
Hands-on LAB
19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 20. Monitoring of MySQL Cluster
Cluster Processes & Logs
§ Are the Cluster processes running?
ps aux | grep ndb
ps aux | grep mysqld
§ Tail of the Management Log:
tail -f
$HOME/cluster/7.2.7/ndb_data/ndb_1_cluster.log
20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 21. 3. Connecting to
MySQL Cluster
21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 22. Connecting to MySQL Cluster
SQL & NoSQL Access to Cluster Data
Management Client Connectors & APIs
(administration) (SQL or NoSQL access)
1 2 3
Later,
in Section # 6 !
MySQL Client
(SQL access)
22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 23. It's Your Turn!
Execute The Commands at Section # 4 of the HOL Instructions
Main point
Hands-on LAB
23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 24. 4. Safe Shutdown of
MySQL Cluster
24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 25. Safe Shutdown of MySQL Cluster
A Two-Step Process
Use of the Cluster's
"shutdown" command
1 2
Shutdown (or not)
all the SQL Nodes
25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 26. MySQL Cluster Shutdown - Sample Output
§ Cluster's "shutdown" command:
ndb_mgm> shutdown
Node 3: Cluster shutdown initiated
Node 4: Cluster shutdown initiated
Node 3: Node shutdown completed.
Node 4: Node shutdown completed.
3 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.
ndb_mgm>
§ .. and how it looks on the Cluster Logs:
2012-09-25 09:58:09 [MgmtSrvr] INFO -- Node 3: Cluster shutdown initiated
2012-09-25 09:58:09 [MgmtSrvr] INFO -- Node 4: Cluster shutdown initiated
2012-09-25 09:58:16 [MgmtSrvr] ALERT -- Node 1: Node 3 Disconnected
2012-09-25 09:58:16 [MgmtSrvr] INFO -- Node 3: Node shutdown completed.
2012-09-25 09:58:16 [MgmtSrvr] INFO -- Node 4: Node shutdown completed.
2012-09-25 09:58:16 [MgmtSrvr] ALERT -- Node 1: Node 4 Disconnected
2012-09-25 09:58:20 [MgmtSrvr] INFO -- Shutting down server...
2012-09-25 09:58:43 [MgmtSrvr] INFO -- Shutdown complete
26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 27. 5. Overview of Main
MySQL Cluster's
Admin Commands & Operations
27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 28. MySQL Cluster
Overview of Main Administration Commands & Operations
§ Management Client's Commands:
HELP, SHOW, START BACKUP, node_id START | STOP | RESTART
ENTER | EXIT SINGLE USER MODE
SHUTDOW, CREATE | DROP NODEGROUP
CLUSTER LOG ON | OFF | INFO
node_id CLUSTERLOG category=threshold
§ Cluster Operations:
– On-line Node Add, On-line Rolling Restart
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 29. 6. NDB API & JAVA
Examples
29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 30. NDB API & JAVA Examples
SQL or NoSQL Access? You Decide!
Download of Definition of Varibles:
Source Code Examples CFLAGS,LDFLAGS,
LD_LIBRARY_PATH,CLASSPATH
1 2 3 4
Source Code
Installation of gcc-c++, Compilation &
java-devel & Connector J Execution
30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 31. It's Your Turn!
Execute The Commands at Sections # 6,7,8,9,10 & 11 of the
HOL Instructions
Main point
Hands-on LAB
31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 32. 7. MySQL Cluster CGE &
Conclusion
32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 33. MySQL Cluster Carrier Grade Edition
No Trade-Offs
No Trade-Offs
On the Top
More: www.mysql.com/buy-mysql
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 34. MySQL Cluster Manager
Reducing Complexity, Improving Management Efficiency
Reducing TCO & Creating a More Agile, Highly
Available Database Environment
Automated
Management
High
Monitoring &
Availability
Recovery
Operation
34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 35. MySQL Enterprise Monitor
Enterprise Monitor, Advisors & Query Analyzer
Your Virtual
MySQL DBA
Assistant !
35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 36. MySQL Cluster Installer EA
Easiness of Use
36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 37. MySQL Cluster Installer EA
Easiness of Use
37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 38. Oracle Premier Support for MySQL
Rely on The Experts - Get Unique Benefits
Largest Team of MySQL Experts
Backed by MySQL Developers
Forward Compatible Hot Fixes Only From
MySQL Maintenance Releases Oracle
Support in 29 Languages
Direct Access to MySQL Support Engineers "The rep that assisted me was
24/7/365 simply outstanding. He
immediately recognized the cause
Unlimited Incidents of my problem and provided the
resolution.”
Knowledge Base
mysql.com/support/quotes
MySQL Consultative Support
38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 39. Resources
mysql.com dev.mysql.com eDelivery.com
• TCO calculator • Community Downloads • Oracle Software Delivery Cloud
• White Papers • Documentation • Download and evaluate all
• Customer use cases and • Dev Articles MySQL products
success stories • Forums
• PlanetMySQL
MySQL Support: www.mysql.com/support
39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 40. Summary
§ MySQL Cluster § Proved
– Web-Scale Performance with Carrier-Grade – Deployed across Telecoms
Availability Networks
– SQL & NoSQL Access Methods
– Powering Mission-Critical Web
Applications
§ No Compromise
– Scale-Out, Real Time Performance, 99.999% Uptime
More Information
www.mysql.com/cluster
40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 41. MySQL Cluster
The default database for anyone
deploying rapidly evolving, real-
time transactional services at
web-scale, where downtime is
simply not an option
41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 42. The preceding 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.
42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 43. Thanks For
Your Attention!
santo.leto@oracle.com
blogs.oracle.com/santo
43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 44. 44Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12