Upload
thingsandstuff
View
123
Download
0
Embed Size (px)
DESCRIPTION
Presentation about MySQL Cluster given 14 Jul 2010
Citation preview
<Insert Picture Here>
MySQL Cluster 7.1Andrew Morgan Mat Keep
MySQL Cluster Product Manager MySQL Product Management
Agenda
• Introduction to MySQL Cluster
• Deep Dive into MySQL Cluster 7.1 New Features
• Resources to Get Started
Open-source powers the Web & the Network
Serving Key Markets & Industry Leaders
Enterprise 2.0TelecommunicationsOn Demand, SaaS, Hosting
Web / Web 2.0 OEM / ISV's
MySQL Cluster Users and ApplicationsHA, Real Time Services: Web & Telecoms
•http://www.mysql.com/customers/cluster/
• Subscriber Databases
• Service Delivery Platforms
• Application Servers
• Telco Value Added Services
• Web Session Stores
• eCommerce
• VoIP, IPTV & VoD
• Mobile Content Delivery
• On-Line app stores and portals
• DNS/DHCP for Broadband
• Payment Gateways
• Data Store for LDAP Directories
MySQL Cluster -
Key Advantages
High Throughput Reads & Writes
Carrier-Grade Availability
Real-Time Responsiveness
On-Line, Linear Scalability
Low TCO, Open platform
Distributed, Parallel architecture
Transactional, ACID-compliant relational database
Shared-nothing design, synchronous data replication
Sub-second failover & self-healing recovery
High-load, real-time performance
Predictable low latency, bounded access times
Incrementally scale out, scale up and scale on-line
Linearly scale with distribution awareness
GPL & Commercial editions, scale on COTS
Flexible APIs: SQL, C++, Java, OpenJPA, LDAP & HTTP
MySQL Cluster Data Nodes
MySQL Cluster Application Nodes
MySQL Cluster Mgmt
Clients
MySQL Cluster Architecture
Parallel Database with no SPOF: High Read & Write Performance & 99.999%
uptime
MySQL Cluster Mgmt
MySQL Cluster 7.0 Momentum (GA April ‘09)
4x Higher Throughput
2x Faster Record Handling
On-Line Cluster Scaling
I/O Multi-Threading
LDAP Interface
Windows Port
250% Increase in Download Rate
Largest Entertainment Guide on the
Mobile Web:
“go2 has the ability to efficiently scale
our platform with the growth of the
mobile web”
Dan Smith, Co-Founder & CEO, go2 Media
Leading Provider of Mobile, Fixed &
Broadband Services across Europe & Asia
“Telenor has found MySQL Cluster to be the
best performing database in the world for
our applications.”
Peter Eriksson, Manager, Network Provisioning
Delivering up to 10x higher Java Throughput
MySQL Cluster Connector for Java:
Native Java API
OpenJPA Plug-In
Reducing Cost of Operations
Simplified Management & Monitoring:
NDBINFO
MySQL Cluster Manager (part of CGE only)
Faster Restarts
MySQL Cluster CGE 7.1 –
Key Enhancements
ndbinfo
• New database (ndbinfo) which
presents real-time metric data in
the form of tables
• Exposes new information together
with providing a simpler, more
consistent way to access existing
data
• Examples include:
• Resource usage (memory, buffers)
• Event counters (such as number of
READ operations since last restart)
• Data node status and connection status
mysql> use ndbinfo
mysql> show tables;
+-------------------+
| Tables_in_ndbinfo |
+-------------------+
| blocks |
| config_params |
| counters |
| logbuffers |
| logspaces |
| memoryusage |
| nodes |
| resources |
| transporters |
+-------------------+
ndbinfo
• Example 1: Check memory usage/availability
mysql> select * from memoryusage;
+---------+--------------+------+------+
| node_id | DATA_MEMORY | used | max |
+---------+--------------+------+------+
| 3 | DATA_MEMORY | 594 | 2560 |
| 4 | DATA_MEMORY | 594 | 2560 |
| 3 | INDEX_MEMORY | 124 | 2336 |
| 4 | INDEX_MEMORY | 124 | 2336 |
+---------+--------------+------+------+
• Note that there is a DATA_MEMORY and INDEX_MEMORY row for each data node
in the cluster
• If the Cluster is nearing the configured limit then increase the DataMemory and/or
IndexMemory parameters in config.ini and then perform a rolling restart
ndbinfo
• Example 2: Check how many table scans performed on each data node since the last
restartmysql> select node_id as 'data node', val as 'Table Scans' from counters
where counter_name='TABLE_SCANS';
+-----------+-------------+
| data node | Table Scans |
+-----------+-------------+
| 3 | 3 |
| 4 | 4 |
+-----------+-------------+
• You might check this if your database performance is lower than anticipated
• If this figure is rising faster than you expected then examine your application to
understand why there are so many table scans
MySQL Cluster 7.1: ndbinfo
• Example 3: Check if approaching the point at which the undo log completely fills up
between local checkpoints (which could result in delayed transactions or even a database
halt if not addressed):
mysql> select node_id as 'data node', total as 'configured undo log buffer
size', used as 'used buffer space' from logbuffers where log_type='DD-
UNDO';
+-----------+---------------------------------+-------------------+
| data node | configured undo log buffer size | used buffer space |
+-----------+---------------------------------+-------------------+
| 3 | 2096128 | 0 |
| 4 | 2096128 | 0 |
+-----------+---------------------------------+-------------------+
• If log buffer is almost full then increase size of log buffer
MySQL Cluster 7.1: ndbinfo.counters
• View created from hidden tables to
present counters for the number of
events since the last node restart
• When using a single threaded data
node (ndbd), block _instance=0
• If using a multi-threaded data node
(ndbmtd) then there will be a DBLQH
row for each Local Query Handler
thread, for the OPERATIONS
counter, identified with different
values for block_instance
•mysql> select * from ndbinfo.counters;
•+---------+------------+----------------+------------+--------------+------+
| node_id | block_name | block_instance | counter_id | counter_name | val |
+---------+------------+----------------+------------+--------------+------+
| 3 | DBLQH | 1 | 10 | OPERATIONS | 2069 |
| 3 | DBLQH | 2 | 10 | OPERATIONS | 28 |
| 4 | DBLQH | 1 | 10 | OPERATIONS | 2066 |
| 4 | DBLQH | 2 | 10 | OPERATIONS | 27 |
| 3 | DBTC | 0 | 1 | ATTRINFO | 140 |
| 3 | DBTC | 0 | 2 | TRANSACTIONS | 19 |
| 3 | DBTC | 0 | 3 | COMMITS | 19 |
| 3 | DBTC | 0 | 4 | READS | 19 |
| 3 | DBTC | 0 | 5 | SIMPLE_READS | 0 |
| 3 | DBTC | 0 | 6 | WRITES | 0 |
| 3 | DBTC | 0 | 7 | ABORTS | 0 |
| 3 | DBTC | 0 | 8 | TABLE_SCANS | 0 |
| 3 | DBTC | 0 | 9 | RANGE_SCANS | 0 |
| 4 | DBTC | 0 | 1 | ATTRINFO | 2 |
| 4 | DBTC | 0 | 2 | TRANSACTIONS | 1 |
| 4 | DBTC | 0 | 3 | COMMITS | 1 |
| 4 | DBTC | 0 | 4 | READS | 1 |
| 4 | DBTC | 0 | 5 | SIMPLE_READS | 0 |
| 4 | DBTC | 0 | 6 | WRITES | 0 |
| 4 | DBTC | 0 | 7 | ABORTS | 0 |
| 4 | DBTC | 0 | 8 | TABLE_SCANS | 1 |
| 4 | DBTC | 0 | 9 | RANGE_SCANS | 0 |
+---------+------------+----------------+------------+--------------+------+
MySQL Cluster 7.1: ndbinfo.logbuffers
• View created from hidden tables to present
log buffer usage
• log_type=REDO: „total‟ represents the
amount of memory configured for the redo
logs and „used‟ indicates how much of it is
currently being used. If the buffer fills up
then will see 1221 “REDO log buffers
overloaded” errors – avoid this by
increasing the RedoBuffer configuration
parameter if „used‟ approaches „total‟
• log_type=DD_UNDO: „total‟ represents the
amount of memory configured for the undo
logs (UNDO_BUFFER_SIZE when creating
the log group) and „used‟ indicates how
much of it is currently being used. If buffers
fill too quickly then transactions can be
delayed while they are flushed to disk; in
extreme cases causing database to halt
mysql> select * from ndbinfo.logbuffers;
+---------+----------+--------+----------+----------+--------+
| node_id | log_type | log_id | log_part | total | used |
+---------+----------+--------+----------+----------+--------+
| 3 | REDO | 0 | 0 | 67108864 | 262144 |
| 3 | DD-UNDO | 4 | 0 | 2096128 | 0 |
| 4 | REDO | 0 | 0 | 67108864 | 262144 |
| 4 | DD-UNDO | 4 | 0 | 2096128 | 0 |
+---------+----------+--------+----------+----------+--------+
MySQL Cluster 7.1: ndbinfo.logspaces
• View created from hidden tables to
present logspace usage
• log_type=REDO: 1 row for each of the 4
file sets for each data node.
„total‟=NoOfFragmentLogFiles*Fragment
LogFileSize and „used‟ is the amount
actually used. If the files fill up before a
local checkpoint can complete then error
code 410 (Out of log file space
temporarily) will be observed. Avoid this
by increasing NoOfFragmentLogFiles
and/or FragmentLogFileSize if used
approaches total.
• log_type=DD_UNDO: „total‟=cumulative
size of all of the undo log files assigned
to the log group, as added using
create/alter logfile group or the
InitialLogFileGroup parameter. Add extra
undo files if „used‟ approaches „total‟ to
avoid 1501 errors
mysql> select * from logspaces;
+---------+----------+--------+----------+-----------+--------+
| node_id | log_type | log_id | log_part | total | used |
+---------+----------+--------+----------+-----------+--------+
| 3 | REDO | 0 | 0 | 536870912 | 0 |
| 3 | REDO | 0 | 1 | 536870912 | 0 |
| 3 | REDO | 0 | 2 | 536870912 | 0 |
| 3 | REDO | 0 | 3 | 536870912 | 0 |
| 3 | DD-UNDO | 4 | 0 | 78643200 | 169408 |
| 4 | REDO | 0 | 0 | 536870912 | 0 |
| 4 | REDO | 0 | 1 | 536870912 | 0 |
| 4 | REDO | 0 | 2 | 536870912 | 0 |
| 4 | REDO | 0 | 3 | 536870912 | 0 |
| 4 | DD-UNDO | 4 | 0 | 78643200 | 169408 |
+---------+----------+--------+----------+-----------+--------+
MySQL Cluster 7.1:
ndbinfo.memoryusage
• View created from hidden tables to present
memory limits and usage
• Compare the amount of memory and index
used to the amount configured for each data
node
• DATA_MEMORY: „max‟ = DataMemory
parameter. If „used‟ approaches „max‟ then
increase DataMemory and/or delete obsolete
rows run OPTIMIZE TABLE for the Cluster
tables
• INDEX_MEMORY: „max‟ = IndexMemory
parameter. If „used‟ approaches „max‟ then
increase IndexMemory (+ DataMemory if
needed) and/or delete obsolete rows run
OPTIMIZE TABLE for the Cluster tables
mysql> select * from memoryusage;
+---------+--------------+------+------+
| node_id | memory_type | used | max |
+---------+--------------+------+------+
| 3 | DATA_MEMORY | 632 | 3144 |
| 4 | DATA_MEMORY | 632 | 3144 |
| 3 | INDEX_MEMORY | 38 | 2336 |
| 4 | INDEX_MEMORY | 38 | 2336 |
+---------+--------------+------+------+
MySQL Cluster 7.1: ndbinfo.nodes
• View created from hidden tables for the
status of data nodes.
• For each data node that is running in the
cluster, a corresponding row in this table
provides the• Uptime: time in seconds that this node has been
running since it was last started or restarted.
• Status: One of NOTHING, CMVMI, STARTING,
STARTED, SINGLEUSER, STOPPING_1,
STOPPING_2, STOPPING_3, or STOPPING_4.
• Start-phase: If Status=STARTING then the start-phase
(as seen through ndb_mgm), 0 otherwise.
mysql> select * from nodes;
+---------+--------+---------+-------------+
| node_id | uptime | status | start_phase |
+---------+--------+---------+-------------+
| 3 | 3719 | STARTED | 0 |
| 4 | 3719 | STARTED | 0 |
+---------+--------+---------+-------------+
MySQL Cluster Connector for Java
• New Domain Object Model
Persistence API (ClusterJ) :
• Java API
• High performance, low latency
• Feature rich
• JPA interface built upon this new
Java layer:
• Java Persistence API compliant
• Implemented as an OpenJPA plugin
• Uses ClusterJ where possible, reverts
to JDBC for some operations
• Higher performance than JDBC
• More natural for most Java designers
• Easier Cluster adoption for web
applicationsData Nodes
Network
ClusterJ
• High Performance, Easy to Use
• In the style of Hibernate / JPA / JDO
• Domain Object Model DataMapper pattern
• Data is represented as domain objects
• Domain objects are separate from business logic
• Domain objects are mapped to database tables
• Built on ndbjtie
• JNI adapter
• integral part of MySQL Cluster
• Straight mapping of MySQL Cluster API (a.k.a Ndb API) to Java
• Does not support relationships
• Look at JDO / JPA for these modelling patterns
Cluster/J Interfaces
• SessionFactory
• One per Cluster per JVM
• Session
• Instance per user; represents a
Cluster connection
• Transaction
• Instance per Session
• Query
• Multiple instances per Session
Session
Factory
Configuration
properties
Session &
Transaction
Session &
Transaction
Session &
Transaction
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Domain
Object
Annotated
interface
Domain
Object
ClusterJ Configuration properties
example
com.mysql.clusterj.connectstring=192.168.0.44:1186
com.mysql.clusterj.database=clusterdb
com.mysql.clusterj.connect.retries=4
com.mysql.clusterj.connect.delay=5
com.mysql.clusterj.connect.verbose=1
com.mysql.clusterj.connect.timeout.before=30
com.mysql.clusterj.connect.timeout.after=20
com.mysql.clusterj.max.transactions=1024
ClusterJ Annotated interface example
CREATE TABLE employee (
id INT NOT NULL PRIMARY KEY,
first VARCHAR(64) DEFAULT NULL,
last VARCHAR(64) DEFAULT NULL,
municipality VARCHAR(64) DEFAULT NULL,
started VARCHAR(64) DEFAULT NULL,
ended VARCHAR(64) DEFAULT NULL,
department INT NOT NULL DEFAULT 1,
UNIQUE KEY idx_u_hash (first,last)
USING HASH,
KEY idx_municipality (municipality)
) ENGINE=NDBCLUSTER;
@PersistenceCapable(table="employee")
@Index(name="idx_uhash")
public interface Employee {
@PrimaryKey
int getId();
void setId(int id);
String getFirst();
void setFirst(String first);
String getLast();
void setLast(String last);
@Column(name="municipality")
@Index(name="idx_municipality")
String getCity();
void setCity(String city)
String getStarted();
void setStarted(String date);
String getEnded();
void setEnded(String date);
Integer getDepartment();
void setDepartment(
Integer department);}
ClusterJ Application code example
// Create a session (connection to the database)
SessionFactory factory = ClusterJHelper.getSessionFactory(props);
Session session = factory.getSession();
// Create and initialise an Employee
Employee newEmployee = session.newInstance(Employee.class);
newEmployee.setId(988);
newEmployee.setFirst("John");
newEmployee.setLast("Jones");
newEmployee.setStarted("1 February 2009");
newEmployee.setDepartment(666);
// Write the Employee to the database
session.persist(newEmployee);
// Fetch the Employee from the database
Employee theEmployee = session.find(Employee.class, 988);
// Make some changes to the Employee & write back to the database
theEmployee.setDepartment(777);
theEmployee.setCity("London");
session.updatePersistent(theEmployee);
// Retrieve the set all of Employees in department 777
QueryBuilder builder = session.getQueryBuilder();
QueryDomainType<Employee> domain = builder.createQueryDefinition(Employee.class);
domain.where(domain.get("department").equal(domain.param("department")));
Query<Employee> query = session.createQuery(domain);
query.setParameter("department",777);
List<Employee> results = query.getResultList();
ClusterJPA
• Removes ClusterJ limitations:
• Persistent classes
• Relationships
• Joins in queries
• Lazy loading
• Table and index creation from object model
• Implemented as an OpenJPA plugin
• Better JPA performance for insert, update, delete
ClusterJPA Annotated class example
@Entity(name = "department")
public class Department {
private int Id;
private String Site;
public Department(){}
@Id public int getId()
{return Id;}
public void setId(int id)
{Id=id;}
@Column(name="location")
public String getSite()
{return Site;}
public void setSite(String
site)
{Site=site;}
}
mysql> describe department;
+----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| location | varchar(255) | YES | | NULL | |
+----------+--------------+------+-----+---------+-------+
ClusterJPA Application code example
EntityManagerFactory entityManagerFactory =
Persistence.createEntityManagerFactory("clusterdb");
EntityManager em = entityManagerFactory.createEntityManager();
EntityTransaction userTransaction = em.getTransaction();
userTransaction.begin();
Department dept = new Department();
dept.setId(101);
dept.setSite(“London”);
em.persist(dept);
userTransaction.commit();
userTransaction.begin();
Department theDepartment = em.find(Department.class, 101);
theDepartment.setSite(“Edinburgh”);
userTransaction.commit();
em.close();
entityManagerFactory.close();
Performance
MySQL Cluster Manager 1.0 Features
Monitoring
Status Monitoring &
Recovery
Automated Management
Cluster-Wide
Management
Process Management
On-Line Operations
(Upgrades /
Reconfiguration)
HA Operations
Disk Persistence
Configuration
Consistency
HA Agent Operation
Terms used by MySQL Cluster
Manager• Site: the set of physical hosts which are to run
Cluster processes to be managed by MySQL
Cluster Manager. A site can include 1 or more
clusters.
• Cluster: represents a MySQL Cluster
deployment. A Cluster contains 1 or more
processes running on 1 or more hosts
• Host: Physical machine, running the MySQL
Cluster Manager agent
• Agent: The MySQL Cluster Manager process
running on each host
• Process: an individual MySQL Cluster node;
one of: ndb_mgmd, ndbd, ndbmtd, mysqld &
ndbapi*
• Package: A copy of a MySQL Cluster
installation directory as downloaded from
mysql.com, stored on each host
*ndbapi is a special case, representing a slot for an external application
process to connect to the cluster using the NDB API
Example configuration
• MySQL Cluster Manager agent runs
on each physical host
• No central process for Cluster
Manager – agents co-operate, each
one responsible for its local nodes
• Agents are responsible for managing
all nodes in the cluster
• Management responsibilities
• Starting, stopping & restarting nodes
• Configuration changes
• Upgrades
• Host & Node status reporting
• Recovering failed nodes
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
agent
n. ndb_mgmd
n. mysqld
n. ndbd
MySQL Server (ID=n)
Management Node (ID=n)
Data Node (ID=n)
MySQL Cluster Manager agent
Installing, configuring, running &
accessing MySQL Cluster Manager• The agent must be installed and run on each
host in the Cluster:1. Expand the tar-ball into a known directory
(/usr/local/mcm)
2. Copy /usr/local/mcm/etc/mysql-cluster-manager.ini to
/home/billy/mcm and edit:
3. “plugins=manager” should always be used
4. Launch the agent process:
5. Access any of the agents from any machine (that has the
mysql client installed):
agent
192.168.0.10
agent
192.168.0.11
agent
192.168.0.12
agent
192.168.0.13
[mysql-proxy]
plugins=manager
manager-port = :1862
log-file = mysql-manager-agent.log
log-level = message
manager-directory=/home/billy/mcm/manager
mysql
client
/usr/local/mcm/bin/mysql-cluster-manager --defaults-
file=/home/billy/mcm/mysql-cluster-manager.ini
C:\Users\am233268>mysql -h 192.168.0.10 -P 1862 -u admin –p
Enter password: super
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 1.0.1-agent-manager MySQL Cluster Manager
Type 'help;' or '\h' for help. Type '\c' to clear the
current input statement.
mysql>
Creating & Starting a Cluster
1. Define the site:
2. Expand the MySQL Cluster tar-ball(s)
from mysql.com to known directory
3. Define the package(s):
Note that the basedir should match the
directory used in Step 2.
4. Create the Cluster
This is where you define what
nodes/processes make up the Cluster and
where they should run
5. Start the Cluster:
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
Mysql> create site --hosts=192.168.0.10,192.168.0.11,
-> 192.168.0.12,192.168.0.13 mysite;
Mysql> add package --basedir=/usr/local/mysql_6_3_26 6.3;
Mysql> add package --basedir=/usr/local/mysql_7_0_7 7.0;
Mysql> create cluster --package=6.3
-> [email protected],[email protected],
-> [email protected],[email protected], [email protected],
-> [email protected],[email protected],[email protected]
-> mycluster;
Mysql> start cluster mycluster;
Check the status of the Cluster
1. Request the status of the Cluster
processes
2. Get the status of the hosts & agents
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
mysql> show status --process mycluster;
•+------+----------+--------------+---------+-----------+
| Id | Process | Host | Status | Nodegroup |
+------+----------+--------------+---------+-----------+
| 1 | ndb_mgmd | 192.168.0.10 | running | |
| 2 | ndb_mgmd | 192.168.0.11 | running | |
| 3 | ndbd | 192.168.0.12 | running | 0 |
| 4 | ndbd | 192.168.0.13 | running | 0 |
| 5 | ndbd | 192.168.0.12 | running | 1 |
| 6 | ndbd | 192.168.0.13 | running | 1 |
| 7 | mysqld | 192.168.0.10 | running | |
| 8 | mysqld | 192.168.0.11 | running | |
+------+----------+--------------+---------+-----------+
mysql> list hosts mysite;
•+--------------+-----------+---------+
| Host | Status | Version |
+--------------+-----------+---------+
| 192.168.0.10 | Available | 1.0.1 |
| 192.168.0.11 | Available | 1.0.1 |
| 192.168.0.12 | Available | 1.0.1 |
| 192.168.0.13 | Available | 1.0.1 |
+--------------+-----------+---------+
Checking Cluster parameters• Fetch all parameters that apply to all data
nodes, including defaults:
• Fetch the values of parameters (excluding
defaults) for mysqld with ID=7:
• Fetch the port parameter to connect to
mysqld with ID=7:
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
mysql> get -d :ndbd mycluster;
+-----------------------+-------+----------+------+----------+------+---------+----------+
| Name | Value | Process1 | Id1 | Process2 | Id2 | Level | Comment |
+-----------------------+-------+----------+------+----------+------+---------+----------+
| __ndbmt_lqh_threads | NULL | ndbd | 3 | | | Default | |
| __ndbmt_lqh_workers | NULL | ndbd | 3 | | | Default | |
| Arbitration | NULL | ndbd | 3 | | | Default | |
........ : : : : : : : :
| __ndbmt_lqh_threads | NULL | ndbd | 4 | | | Default | |
| __ndbmt_lqh_workers | NULL | ndbd | 4 | | | Default | |
| Arbitration | NULL | ndbd | 4 | | | Default | |
| ArbitrationTimeout | 3000 | ndbd | 4 | | | Default | |
........ : : : : : : : :
| __ndbmt_lqh_threads | NULL | ndbd | 5 | | | Default | |
........ : : : : : : : :
| __ndbmt_lqh_threads | NULL | ndbd | 6 | | | Default | |
........ : : : : : : : :
+-----------------------+-------+----------+------+----------+------+---------+----------+
mysql> get :mysqld:7 mycluster;
+------------+---------------------------------------------------------+----------+------+-...
| Name | Value | Process1 | Id1 | ...
+------------+---------------------------------------------------------+----------+------+-...
| datadir | /home/billy/mcm/alpha/manager/clusters/mycluster/7/data | mysqld | 7 | ...
| HostName | ws1 | mysqld | 7 | ...
| ndb-nodeid | 7 | mysqld | 7 | ...
| ndbcluster | | mysqld | 7 | ...
| NodeId | 7 | mysqld | 7 | ...
+------------+---------------------------------------------------------+----------+------+-...
mysql> get -d port:mysqld:7 mycluster;
+------+-------+----------+------+----------+------+---------+---------+
| Name | Value | Process1 | Id1 | Process2 | Id2 | Level | Comment |
+------+-------+----------+------+----------+------+---------+---------+
| port | 3306 | mysqld | 7 | | | Default | |
+------+-------+----------+------+----------+------+---------+---------+
Setting Cluster parameters
• Example: Turn of privilege checking for all
MySQL Servers and change the port for
connecting to the mysqld with ID = 8 to
3307. Allow data nodes to be automatically
restarted after they fail:
MySQL Cluster Manager automatically
determines which nodes (processes) need
to be restarted and in which order to make
the change take effect but avoid loss of
service
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
mysql> set skip_grant_tables:mysqld=true,port:mysqld:8=3307,
--> StopOnError:ndbd=false mycluster;
Upgrade Cluster
• Upgrade from MySQL Cluster 6.3.26 to
7.0.7:
• Automatically upgrades each node and
restarts the process – in the correct order to
avoid any loss of service
• Without MySQL Cluster Manager, the
administrator must stop each process in
turn, start the process with the new version
and wait for the node to restart before
moving onto the next one
agent
1. ndb_mgmd
7. mysqld
192.168.0.10
agent
2. ndb_mgmd
8. mysqld
192.168.0.11
agent
5. ndbd
3. ndbd
192.168.0.12
agent
6. ndbd
4. ndbd
192.168.0.13
mysql
client
mysql> upgrade cluster --package=7.0 mycluster;
"MySQL Cluster 7.1 offers the potential for users of the FreeRADIUS AAA server to enhance operational efficiency and performance in the management and access of their business critical and time sensitive applications”
Alan DekokFreeRADIUS Project Founder, CEO of Network RADIUS
"Many of our users rely on OpenLDAP to run their most critical directory services, and with the addition of MySQL Cluster at the back-end, can support highly dynamic and scalable directory databases. The release of MySQL Cluster 7.1 can enhance manageability and platform choice for our communities and customers."
Marty Heyman, CEO of Symas Corporation and OpenLDAP Project Member
Resources to Get Started
•MySQL Cluster 7.1, Architecture and New Features • http://www.mysql.com/why-mysql/white-
papers/mysql_wp_cluster7_architecture.php
• MySQL Cluster Manager white paper• http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_manager.php
•MySQL Cluster Connector for Java white paper• http://www.mysql.com/why-mysql/white-
papers/mysql_wp_cluster_connector_for_java.php
•MySQL Cluster 7.1 Evaluation Guide • http://www.mysql.com/why-mysql/white-papers/mysql_cluster_eval_guide.php
•Getting Started with MySQL Cluster• http://www.mysql.com/products/database/cluster/get-started.html
•MySQL Cluster on the Web• http://www.mysql.com/products/database/cluster/
<Insert Picture Here>