Deep Dive: How to Easily Deploy MySQL Clusters With The Tungsten Cluster AMI

Today’s blog is a bit of a deep dive into how to use the Tungsten Cluster AMI to easily deploy MySQL database clusters. It assumes some knowledge of MySQL database clustering along with the main concepts of Tungsten Clustering for MySQL.

MySQL Database Clustering At Continuent

A general note on the terminology used here at Continuent: a cluster is a group of nodes running MySQL servers managed by the Tungsten Clustering Suite of software. Each cluster then contains one (and only one) Primary node and a minimum of two Replica nodes which each contain an identical copy of the data from the Primary node.

Creating a MySQL dataservice using Tungsten Cluster combines a number of different components, systems and functionality which support a running database dataservice that is capable of handling database failures, complex replication topologies, and management of the client/database connection for both load balancing and failover scenarios. For the full overview of Tungsten Clustering, check out our product page.

Continuent is particularly well-known and loved for its geo-distributed, multi-site Tungsten Clustering, which is simply a “cluster of clusters”, using the basic standalone cluster topology and extending the management mesh to additional sites or regions. You may span across cloud providers (multi-cloud), and can even integrate on-premises hardware with cloud-based instances (hybrid-cloud).

But first off we’re going to take a high-level look at the topologies for MySQL as a recap and to set the scene.

Quick Overview of the Tungsten Cluster Topologies

The Standalone Cluster

This topology is for a single datacenter / region and requires a minimum of 3 nodes:

  • 1 Primary
  • 2 Replicas

An odd number of nodes is always required.

Within a Primary/Replica service, there is a single writeable Primary which replicates data to the Replicas. The Tungsten Connector routes requests by the application and distributes the load to the data sources (nodes) in the dataservice.

The Composite Active/Passive Cluster

This topology requires a minimum of 2 clusters with a minimum of 3 nodes per cluster each.

  • 1 Cluster for read/write
  • All other clusters read-only
  • Can be Cross-Region
  • Simple to use and implement
  • Single, write-able Primary
  • Managed cross-site replication
  • No data conflicts because all writes are handled on a single MySQL server
    • Often used for Disaster Recovery

Tungsten Cluster supports the creation of composite clusters. This includes multiple active/passive data services tied together. One of the data services is identified as the active, containing the Primary node and all other data services (passive) replicate from it.

The Composite Active/Active Cluster

This topology requires a minimum of 2 clusters with a minimum of 3 nodes per cluster each.

  • All clusters are read/write
  • Cross-Region
  • Vastly simplified setup and control
  • Multiple write-able Primaries
  • Managed cross-site replication – the managers are aware of and control the cross-site Replication services.
  • Full Dashboard integration
  • Requires data conflict avoidance approach because writes are handled on multiple MySQL servers
  • From Version 6.0+ of Tungsten Clustering

A Composite Active/Active (CAA) Cluster topology provides all the benefits of a typical dataservice at a single location, but with the benefit of also replicating the information to all other sites. The underlying configuration within Tungsten Cluster uses two services within each node; one provides the replication within the cluster, and the second provides replication from the remote cluster(s). Both are managed by the Tungsten Manager

For a more in-depth look at these topologies and their benefits, please read this blog by our colleague Eric M. Stone: Dig In and De-Mystify Tungsten Cluster Topologies

But for now, let’s dive into the Tungsten Cluster (AMI)!

Tungsten Cluster (AMI) Specifics

The Tungsten Cluster (AMI) on the Amazon Marketplace is essentially a pre-configured template that can be used to launch a dedicated EC2 instance. This instance that will be launched is an Amazon Linux OS, which is fully configured with all the prerequisites required for a MySQL database cluster. You’ll need to launch a number of instances depending on the number of nodes you want and how many clusters you’re configuring.

It’s all pre-configured for you and ready to launch, with everything already there for you including MySQL as well as a dashboard.

There are 2 AMI’s available to choose from (pre-configured with the Community Edition of MySQL) as follows:

The AMIs are pre-configured with Tungsten Dashboard and once they launch, the Dashboard will be available.

This will get your cluster up and running in just a matter of minutes.

There are two ways to launch the AMIs

Manual Approach: Select and launch each individual AMI, launch as many as you like and manually configure them.

CloudFormation Approach: The URLs provided below will guide you through a GUI-type template, which will then launch the full stack for you once you go through the few indicated steps. See below for the launch details. Please also refer to this blog for more details on the CloudFormation approach: Easy MySQL HA Cluster Deployment with AWS CloudFormation.

Note that we offer free access to our Technical Support for the first 14 days and that there is a free trial available by contacting Continuent Sales.

Deployment Options for the Tungsten Cluster (AMI)

Manual Deployment

  • Subscribe to the AMI
  • Launch individual instances (Minimum 3 instances per cluster)
  • Configure Network according to business requirements
  • Ensure security rules correct between nodes
  • Connect to each node and follow launch wizard

CloudFormation Deployment

IMPORTANT NOTE: At this time, Active/Active and Active/Passive clusters deployed via CloudFormation can only be within the same region. If you require a true multi-region distribution, please follow the Manual Launch steps.

Do let us know how you get on with the Tungsten Cluster (AMI).

And if you have any questions, please feel free to comment below.

About the Author

Continuent Team

Continuent, the MySQL Availability Company, since 2004 has provided solutions for continuous operations enabling business-critical MySQL applications to run on a global scale with zero downtime. Continuent provides geo-distributed MySQL high availability on-premises, in hybrid-cloud, and in multi-cloud environments.

Continuent customers are leading SaaS, e-commerce, financial services, gaming and telco companies who rely on MySQL and Continuent to cost-effectively safeguard billions of dollars in annual revenue.

Continuent’s database experts offer the industry's best 24/7 MySQL support services to ensure continuous client operations.

Add new comment