Your SlideShare is downloading. ×
MySQL User Camp: MySQL Cluster
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

MySQL User Camp: MySQL Cluster

755
views

Published on

Priyanka, a MySQL cluster developer, presented MySQL cluster in the MySQL User camp. The slide deck contains an introduction to the cluster module- the architecture, …

Priyanka, a MySQL cluster developer, presented MySQL cluster in the MySQL User camp. The slide deck contains an introduction to the cluster module- the architecture,
auto-sharding, failover etc in the cluster module.

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
755
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. MySQL Cluster Priyanka Sangam (priyanka.sangam@oracle.com) Insert Picture Here
  • 2. Safe Harbour 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.
  • 3. Agenda • Introduction to MySQL Cluster • Working with Cluster tables • Cluster Nodes • Architecture • Auto-sharding • Failover
  • 4. Introduction to MySQL Cluster • Distributed transactional database • In-memory storage • Auto-sharding • Shared-nothing architecture • Automatic failover and recovery • Runs on commodity hardware • SQL + NoSQL interfaces
  • 5. mysql> create table t1(id int primary key, value varchar(10))engine=ndb; Query OK, 0 rows affected (0.80 sec) mysql> show create table t1; +­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ | Table | Create Table                              |                                +­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ | t1    | CREATE TABLE `t1` (   `id` int(11) NOT NULL,   `value` varchar(10) DEFAULT NULL,   PRIMARY KEY (`id`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1          | +­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­+ 1 row in set (0.00 sec) mysql> insert into t1 values(1, "one"), (2,"two"); Query OK, 2 rows affected (0.00 sec) Records: 2  Duplicates: 0  Warnings: 0 mysql> select * from t1; +­­­­+­­­­­­­+ | id | value | +­­­­+­­­­­­­+ |  1 | one   | |  2 | two   | +­­­­+­­­­­­­+ 2 rows in set (0.00 sec) Working with Cluster Tables
  • 6. Cluster Nodes •Data Nodes •Store cluster data •Data partitioned + replicated across many data nodes •ndbd (single-threaded) or ndbmtd (multi-threaded) •SQL Nodes •Access cluster data by querying data nodes •SQL + NoSQL •mysqld •Management Nodes •Manage other nodes •Config, startup, shutdown, backup etc. •ndb_mgmd
  • 7. Architecture
  • 8. ndb_mgm mysql@host1:~$ ndb_mgm ­e show Connected to Management Server at: localhost:1186 Cluster Configuration ­­­­­­­­­­­­­­­­­­­­­ [ndbd(NDB)]     2 node(s) id=2    @127.0.0.1  (mysql­5.5.36 ndb­7.2.16, Nodegroup: 0, *) id=4    @127.0.0.1  (mysql­5.5.36 ndb­7.2.16, Nodegroup: 0) [ndb_mgmd(MGM)] 1 node(s) id=1    @127.0.0.1  (mysql­5.5.36 ndb­7.2.16) [mysqld(API)]   4 node(s) id=3    @127.0.0.1  (mysql­5.5.36 ndb­7.2.16) id=5 (not connected, accepting connect from any host) id=7 (not connected, accepting connect from any host) id=9 (not connected, accepting connect from any host)
  • 9. Auto-sharding – partitioning a table
  • 10. Auto-sharding – fragments
  • 11. Auto-sharding - nodegroups
  • 12. Failover • << Initial state >> • Node1: Primary F1, Secondary F2, Nodegroup 0 • Node2: Primary F2, Secondary F1, Nodegroup 0 • Node3: Primary F3, Secondary F4, Nodegroup 1 • Node4: Primary F4, Secondary F3, Nodegroup 1 • << Node1 fails >> • Node2: Primary F1, Primary F2 • Node3: Primary F3, Secondary F4, Nodegroup 1 • Node4: Primary F4, Secondary F3, Nodegroup 1 • << Node2 fails >> • Cluster failure due to missing nodegroup • Node3. Node4 shut down
  • 13. References • Introduction to MySQL Cluster: http://www.slideshare.net/andrewjamesmo rgan/mysql-cluster-introduction • Cluster Reference Manual: http://dev.mysql.com/doc/mysql-cluster-ex cerpt/5.1/en/index.html