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

MySQL User Camp: MySQL Cluster

on

  • 386 views

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.

Statistics

Views

Total Views
386
Slideshare-icon Views on SlideShare
384
Embed Views
2

Actions

Likes
2
Downloads
15
Comments
0

2 Embeds 2

https://www.linkedin.com 1
http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    MySQL User Camp: MySQL Cluster MySQL User Camp: MySQL Cluster Presentation Transcript

    • MySQL Cluster Priyanka Sangam (priyanka.sangam@oracle.com) Insert Picture Here
    • 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.
    • Agenda • Introduction to MySQL Cluster • Working with Cluster tables • Cluster Nodes • Architecture • Auto-sharding • Failover
    • 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
    • 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
    • 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
    • Architecture
    • 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)
    • Auto-sharding – partitioning a table
    • Auto-sharding – fragments
    • Auto-sharding - nodegroups
    • 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
    • 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