Quantcast
Viewing latest article 2
Browse Latest Browse All 8

Galera Cluster for MySQL with Amazon Virtual Private Cloud

Next: Galera Configurator and deploying Galera ClusterSetup Load Balancers and Web ServersTest your AWS VPC Galera Cluster

In the next following posts we’ll deploy a multi-master synchronous MySQL Galera Cluster with Amazon’s VPC service. We’re going to create a public facing subnet for app/web servers and a private subnet for our database cluster.

The deployment will look similar to the below diagram.

 

Image may be NSFW.
Clik here to view.

 

Amazon’s VPC provides a secure environment where you can chose to isolate parts of your servers by having complete control of how to deploy your virtual networking infrastructure much like your own datacenter. 

 

The steps that we’ll go through are as following:

 

  1. Create a VPC with Public and Private subnets
  2. Define Security Groups (add rules later)
  3. Launch one instance for ClusterControl
  4. Launch three EBS optimized instances for the Galera/database nodes
  5. Format and mount an EBS volume (or RAID set) for each Galera nodes
  6. Create a Galera Configuration with Severalnines Galera Configurator 
  7. Deploy and bootstrap Galera Cluster
  8. Add an internal load balancer
  9. Add a MySQL user for the internal load balancer
  10. Add web server instances
  11. Add an external load balancer
  12. Test the VPC database cluster setup

At the end we have the following instances available on the public subnet (Note your IP addresses would be different):

 

  • 1 Elastic External Load Balancer, Elastic IP 54.249.29.89
  • 2 Web servers: IP 10.0.0.28, Elastic IP 54.249.30.195 and IP 10.0.0.38, Elastic IP 54.249.30.136
  • 1 ClusterControl server: IP 10.0.0.53,  Elastic IP 54.249.30.164

and on the private subnet:

 

  • 1 Elastic Internal Load Balancer, IP 10.0.1.17
  • Galera Node 1, IP 10.0.1.13
  • Galera Node 2, IP 10.0.1.16
  • Galera Node 3, IP 10.0.1.26

In this example going forward we only deploy one private subnet however if you require a more fault tolerant setup you can for example create two private subnets for the database cluster one in each Availability Zone (AZ) which can protect you from single location failures within a single Amazon region.

 

There are a number issues that needs to be handled properly with a Galera cluster across two regions and/or AZs (which practically is two data centers). This will be addressed in a future post.

 

Tags: 


Viewing latest article 2
Browse Latest Browse All 8

Trending Articles