• About
  • Contact us

MySQL Step-by-Step Blog

MySQL Step-by-Step Blog

Category Archives: High Availability (HA)

Posts about MySQL High Availability

What is the default sharding key in MySQL Cluster?

09 Monday Jan 2017

Posted by Moll in High Availability (HA), MySQL, MySQL Cluster, Sharding

≈ 3 Comments

Tags

Abdel-Mawla Gharieb, MySQL, MySQL Cluster, Partitioning, Sharding

MySQL Cluster does an automatic sharding/partitioning to the tables across data nodes, enabling databases to scale horizontally to serve read and write-intensive workloads, but what is the default sharding key used in partitioning the data?
According to the recent update (Oct, 2016) of the MySQL Cluster white paper, primary key is the default sharding key:

By default, sharding is based on hashing of the primary key, which generally leads to a more even distribution of data and queries across the cluster than alternative approaches such as range partitioning.

However, that is not the case in all MySQL Cluster versions so far!
In this post, I’ll do some test cases on MySQL Cluster (of 4 datanodes) to confirm the default sharding key. Continue reading →

Advertisement

Partitions number in MySQL Cluster

16 Friday Dec 2016

Posted by Moll in High Availability (HA), MySQL, MySQL Cluster, Sharding

≈ 6 Comments

Tags

Abdel-Mawla Gharieb, MySQL, MySQL Cluster, Partitioning, Sharding

As stated in the MySQL Cluster documentation:

Partition.  This is a portion of the data stored by the cluster. There are as many cluster partitions as nodes participating in the cluster. Each node is responsible for keeping at least one copy of any partitions assigned to it (that is, at least one replica) available to the cluster.

According to my understanding for the previous paragraph, if we have a cluster of 6 datanodes we should have 6 partitions for each NDB table. I claim that this is not true for all cases – at least, after the introduction of ndbmtd (Multi-Threaded Daemon) in MySQL Cluster 7.2 .
In this post, I’ll do some test cases to show that the number of partitions in the cluster has a relation with the number of LDM threads as well as the number of data nodes. Continue reading →

Can we set Replication Filters per channel in Multi-Source Replication?

12 Tuesday Apr 2016

Posted by Moll in High Availability (HA), MySQL, MySQL Replication

≈ 4 Comments

Tags

Abdel-Mawla Gharieb, Multi-Source Replication, MySQL, MySQL Replication, Replication Filters

Multi-Source Replication is one of the awesome features in MySQL 5.7 which allows the slave to get the replication streams from multiple masters by having a replication channel for each master.
But what about the replication filters? Can we set replication filters per channel in the multi-source replication?

In brief, replication filtering is a way used to eliminate part of the master’s events (not) to be replicated to the slaves (Also known as Partial Replication). This can be done on either master (using --binlog-do-db and --binlog-ignore-db options) or slaves (using --replicate-* options) while it is not recommended on the master anyway at least to provide Point in Time Recovery (PiTR).

Worth mentioning here that changing the replication filters online is yet another very nice improvement in MySQL 5.7 as well in which we have to stop only the SLAVE SQL_THREAD – instead of restarting the whole MySQL service – to change the replication filters by using “CHANGE REPLICATION FILTER” statement. Continue reading →

MySQL High Available with MHA

01 Monday Jun 2015

Posted by Moll in High Availability (HA), MySQL, MySQL Operations

≈ 18 Comments

Tags

Abdel-Mawla Gharieb, HA, MHA, MySQL

Providing a suitable High Availability (HA) solution for each database system is one of the challenging tasks for a DBA and here we have to answer some questions like the following ones:

  1. What is the cost for that HA solution?
  2. Is it required to change the system structure or the DB design to use that HA solution?
  3. Is it complicate to understand, use or maintain ?

Choosing the suitable HA solution for each system will depend on the answers of such questions …
In this post, I’m going to write about MySQL Master High Availability MHA as a nice tool which provides HA for MySQL by performing automatic fail-over or fast online master switching with almost no downtime!

Before going through more details about MHA, let’s first answer the previous questions:

  1. MHA is a free opensource tool, no cost to use it in your system and even no additional servers are required.
  2. No system changes or DB redesign are required to use MHA, keep your system as it is and just use the tool! (Assuming that MySQL replication is already being used).
  3. MHA is easy to implement and its usage is simple.

Continue reading →

Percona Live MySQL & Expo Conference: GTID Replication slides

22 Wednesday Apr 2015

Posted by Moll in High Availability (HA), MySQL, MySQL Replication

≈ 2 Comments

Tags

Abdel-Mawla Gharieb, MySQL, MySQL Conference & Expo

If you couldn’t have the chance to attend my session “GTID Replication – Implementation and Troubleshooting” at Percona Live MySQL & Expo Conference in Santa Clara April 13-16, 2015, the slides of my presentation are now available.
The talk was mainly about the new feature in MySQL 5.6 “GTID”, what is the concept, benefits, GTID replication implementation and troubleshooting and how to perform the migration from classic replication to GTID replication in both MySQL 5.6 and 5.7.
If you have any question, feel free to contact me 🙂

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • August 2019
  • May 2018
  • April 2017
  • January 2017
  • December 2016
  • November 2016
  • April 2016
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015

Categories

  • MySQL
    • Backup and Recovery
    • High Availability (HA)
    • MySQL Cluster
    • MySQL Operations
    • MySQL Replication
    • Sharding

Meta

  • Register
  • Log in
Follow MySQL Step-by-Step Blog on WordPress.com

Website Powered by WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • MySQL Step-by-Step Blog
    • Join 25 other followers
    • Already have a WordPress.com account? Log in now.
    • MySQL Step-by-Step Blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar