This past week was marked by a series of personal findings related to the use of Global Transaction IDs (GTIDs) on Galera-based clusters such as Percona XtraDB Cluster (PXC). The main one being the fact that transactions touching MyISAM tables (and FLUSH PRIVILEGES!) issued on a giving node of the cluster are recorded on a GTID set bearing the node’s server_uuid as “source id” and added to the binary log (if the node has binlog enabled), thus being replicated to any async replicas connected to it. However, they won’t be replicated across the cluster (that is, all of this is by design, if wsrep_replicate_myisam is …
[Read more]Say you have a cluster with 3 nodes using Percona XtraDB Cluster (PXC) 5.6 and one asynchronous replica connected to node1. If asynchronous replication is using GTIDs, moving the replica so that it is connected to node2 is trivial, right? Actually replication can easily break for reasons that may not be obvious at first sight.
Summary
Let’s assume we have the following setup with 3 PXC nodes and one asynchronous replica:
Regarding MySQL GTIDs, a Galera cluster behaves like a
distributed master: transactions coming from any node will use
the same auto-generated uuid. This auto-generated uuid is related
to the Galera uuid, it’s neither ABC, nor DEF, nor GHI.
Transactions executed for …
[Read more]January 27, 2015 By Severalnines
Unlike standard MySQL server and MySQL Cluster, the way to start a MySQL/MariaDB Galera Cluster is a bit different. Galera requires you to start a node in a cluster as a reference point, before the remaining nodes are able to join and form the cluster. This process is known as cluster bootstrap. Bootstrapping is an initial step to introduce a database node as primary component, before others see it as a reference point to sync up data.
How does it work?
When Galera starts with the bootstrap command on a node, that particular node will reach Primary state (check the value of wsrep_cluster_status). The remaining nodes will just require a normal start command and they will automatically look for existing Primary Component (PC) in the cluster and join to form a cluster. Data synchronization then happens through either incremental state transfer (IST) or …
[Read more]September 25, 2014 By Severalnines
Coming up with a backup strategy that does not affect database performance or lock your tables can be tricky. How do you backup your production database cluster without affecting your applications? Should you use mysqldump or Percona Xtrabackup? When should you use incremental backups? Where do you store the backups? In this blog post, we will cover some of the common backup methods for Galera Cluster for MySQL/MariaDB, and how you can get the most out of these.
Backup Method
There are various ways to backup your Galera Cluster data:
- xtrabackup (full physical backup)
- xtrabackup (incremental physical backup)
- mysqldump (logical backup)
- binary logging
- replication slave
Xtrabackup (full backup)
Xtrabackup is an open-source MySQL hot …
[Read more]September 10, 2014 By Severalnines
If you are automating your infrastructure using Puppet, then this blog is for you. We are glad to announce the availability of a Puppet module for ClusterControl. For those using Chef, we already published Chef cookbooks for Galera Cluster and ClusterControl some time back.
ClusterControl on Puppet Forge
The ClusterControl module initial release is available on Puppet Forge, installing the module is as easy as:
$ puppet module install severalnines-clustercontrol
If you haven’t change the default module path, this module will be installed under /etc/puppet/modules/clustercontrol on …
[Read more]A common migration path from standalone MySQL/Percona Server to a Percona XtraDB Cluster (PXC) environment involves some measure of time where one node in the new cluster has been configured as a slave of the production master that the cluster is slated to replace. In this way, the new cluster acts as a slave of the production environment – traditional replication takes care of getting the data into the cluster, and then Galera replication handles the intra-cluster traffic. This often works without issue, although there is one case that I’ve encountered recently where special care must be taken to properly configure the stream to ensure that replication does not break. If you use multi-valued inserts with auto-increment columns, then this post is for you.
For purposes of our discussion, assume that we have a basic 3-node PXC cluster that we’ve set up …
[Read more]September 3, 2014 By Severalnines
Running your database cluster on AWS is a great way to adapt to changing workloads by adding/removing instances, or by scaling up/down each instance. At Severalnines, we talk much more about scale-out than scale up, but there are cases where you might want to scale up an instance instead of scaling out.
In this post, we’ll show you how to change instance sizes with respect to RAM, CPU and IOPS, and how to tune your Galera nodes accordingly. Moreover, this post assumes that instances are launched using Amazon VPC.
When do we need to upgrade an instance?
You typically need to upgrade an instance when you run out of server resources. This includes CPU, RAM, storage capacity, disk throughput and bandwidth. You must allow enough headroom for …
[Read more]Galera replication for MySQL brings not only the new, great features to our ecosystem, but also introduces completely new maintenance techniques. Are you concerned about adding such new complexity to your MySQL environment? Perhaps that concern is unnecessarily.
I am going to present here some simple tips that hopefully will let fresh Galera users prevent headaches when there is the need to recover part or a whole cluster in certain situations. I used Percona XtraDB Cluster (project based on Percona Server and Galera library + MySQL extensions from Codership) to prepare this post, but most if not all of the scenarios should also apply to any solution based on MySQL+Galera tandem you actually chose, whether these are binaries from Codership, MariaDB Galera Cluster or …
[Read more]Github user Adrianlzt provided a python-twisted alternative version of pyclustercheck per discussion on issue 7.
Due to sporadic performance issues noted with the original implementation in SimpleHTTPserver, the benchmarks which I’ve included as part of the project on github use mutli-mechanize library,
- cache time 1 sec
- 2 x 100 thread pools
- 60s ramp up time
- 600s total duration
- testing simulated node fail (always returns 503, rechecks mysql node on cache expiry)
- AMD FX(tm)-8350 Eight-Core Processor
- Intel 330 SSD
- local loop back test (127.0.0.1)
The SimpleHTTPServer instance faired as follows:
…
[Read more]
As many of you already know, PLMCE is an annual MySQL
community conference and Expo organized by Percona in the month
of April
(usually). It is a great conference, not only to meet new and
eminent people in
MySQL and related database fields, but also to attend interesting
talks, and
also to give some.
This year I spoke about synchronous replication at a higher
level. The talk was
titled “ACIDic Clusters: Review of current relational
databases with synchronous replication”. Having previously
given talks with boring titles (but interesting content), this
time I decided to go with an interesting title, and it seemed to
fit well with topic being discussed.
…