Wiki Home | Recent changes | View source | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Cloud Computing Made Easy®

MySQL Cluster

From Cloud Computing Wiki - Kaavo

Share/Save/Bookmark

Contents

Overview

IMOD, the MySQL Cluster System Definition templates for 32bit and 64bit OS for EC2 are provided as best practice examples to help users. Users are expected to customize the provided solutions for their own needs. Please also refer to the article on MySQL cluster fault tolerance to understand how the cluster works and how to properly configure it for your needs. The information assumes that the users have basic understanding of deploying and starting systems in IMOD. Please refer to the Quick Start Guide Quick Start Guide to learn the basics of deploying and starting a system.

                               32 bit template                     |   64 bit template
Instance Type : (m1.small)                                         | (m1.large)
Ami           : 32 bit image (ami-5647a33f)                        | 64 bit image (ami-2a5fba43)
Required RPM : MySQL-Cluster-gpl-client-7.0.9-0.rhel5.i386.rpm     | MySQL-Cluster-gpl-client-7.0.9-0.rhel4.x86_64.rpm
               MySQL-Cluster-gpl-server-7.0.9-0.rhel5.i386.rpm     | MySQL-Cluster-gpl-server-7.0.9-0.rhel4.x86_64.rpm
               MySQL-Cluster-gpl-storage-7.0.9-0.rhel5.i386.rpm    | MySQL-Cluster-gpl-storage-7.0.9-0.rhel5.x86_64.rpm
               MySQL-Cluster-gpl-tools-7.0.9-0.rhel5.i386.rpm      | MySQL-Cluster-gpl-management-7.0.9-0.rhel4.x86_64.rpm
               MySQL-Cluster-gpl-management-7.0.9-0.rhel5.i386.rpm | MySQL-Cluster-gpl-tools-7.0.9-0.rhel4.x86_64.rpm          

Please also check when to use MySQL Cluster vs. when to use Master/Slave. Cluster was introduced by MySQL couple of years back, for scalability it is the preferred solution. One limitation is that it currently doesn't support foreign key constraints, this limitation may not be an issue if your application uses an O/R mapping layer e.g. Hibernate, EJB, ActiveRecord, etc. for enforcing the constraints.

What does it do?

With a single click bring online fully functional Mysql cluster with 3 servers, 1 Manager server group having role manager, and 2 NDBD node group having role dual-ndb-api.

What deployment actions are included in the System Definition?

Default deployment has two server roles and 3 servers. One server for running the Manager node process (server role MySQL Manager), and two servers for NDBD node and API node processes (server role dual-node). If you are running a multi-tier system you can run the Manager node process on your app or web tier. You shouldn't run the manager node on the same server as NDBD node as it can cause the entire cluster to fail in case the manager process dies. If manager process is running on separate server then killing the manager process doesn't impact cluster runtime performance. Manager node process is used for backups and schema changes. API node is used for performing queries, and NDBD node is maintaining data. For an HA setup you need at least two NDBD nodes and two API nodes . You can change the number of nodes per your deployment needs in the system definition. Please refer to MySQL documentation to learn about MySQL Cluster.

2 API Node processes per NDBD Node Process                  |  4 API Node Processes per NDBD Node Process
MySQL number of slow queries 01 Mar 2010 23:10:47 21        |  MySQL number of slow queries 25 Feb 2010 09:38:44 0
MySQL number of threads 01 Mar 2010 23:10:48 11             |  MySQL number of threads 25 Feb 2010 09:38:45 23
MySQL queries per second 01 Mar 2010 23:10:45 339.84 qps    |  MySQL queries per second 25 Feb 2010 09:38:43 414.51 qps

What run-time actions/events are defined in the System Definition?

Configuration for your setup

You will need to provide the values of the parameters for the following actions for your setup

<parameter name="access_key" type="literal" value="put_your_s3_access_key"/>  
<parameter name="secret_key" type="literal" value="put_your_s3_secret_key"/>
<parameter name="BUCKET" type="literal" value="put_your_bucket_name"/>
<parameter name="DATABASE_NAME" type="literal" value="put_your_database_name"/>
<parameter name="BUCKET" type="literal" value="put_your_bucket_name"/>
<parameter name="DATABASE_NAME" type="literal" value="put_your_database_name"/>
<parameter name="BACKUP_FILE" type="literal" value="put_your_backup_filename"/>

What run-time Events are defined in the System Definition?

Note : Before scaleup or recovery event please make sure to backup your database using backup-database action. You can use scheduler to automatically take scheduled backups at specified intervals. The backups are for disaster recovery in case all the NDBD nodes with redundant data are lost. For example in this setup, data wouldn't be lost in case one of the two dual-node server dies for any reason.

Connection String

For connection string if you use jdbc connection, use the following format. You will need to add comma separated URLs for each dual-node (servers running ndbd and api nodes), since this is a cluster setup all nodes can perform read & write operations.

<connection-url>jdbc:mysql://private_dns_of_ndbd1,private_dns_of_ndbd2:3306/database_name</connection-url>

Monitoring Note

Apart from the common monitoring metrics (CPU, DISK , Memory, Bandwidth), IMOD can monitor Mysql QPS and Number of Slow queries on the mysql API node. We have tested this functionality on  :

Retrieved from "http://wiki.kaavo.com/index.php/MySQL_Cluster"

This page was last modified on 9 February 2012, at 16:03. Content is available under Copyright 2012 Kaavo,All rights reserved..


[Wiki Home]
Wiki Home
Guides and Tutorials
Kaavo Web Services
Solutions
Webinars
FAQs
Free Trial
Release Notes
Kaavo Forums
Join our Mailing List
Contact us
YouTube Channel
Follow on Linkedin
Follow on Twitter
Follow on Facebook
Watch IMOD Demo
Kaavo Home

View source
Discuss this page
Page history
What links here
Related changes

Special pages