Showing entries 1 to 5
Displaying posts with tag: InnoDB ClusterSet (reset)
Jemalloc install & config for MySQL

So, we’ve heard that jemalloc is better than malloc for MySQL usage, and in fact, certain versions / forks of mysql already include this, eg. Percona Server (https://github.com/percona/jemalloc).

But, how can I install and configure my system to use it?

Here’s a quick push in the, hopefully, right direction.

First things first, what is “jemalloc” and how does it affect my system? I think it’s quite well explained here: https://www.percona.com/blog/impact-of-memory-allocators-on-mysql-performance/ albeit an old article.

The right place to get the latest …

[Read more]
MySQL Router quick’n’simple troubleshooting

I thought I’d share some quick intro steps into how we can monitor the MySQL Router.

This can be useful if we’re observing intermittent outages, network packet drops or you’re just not sure if everythings fine in your MySQL InnoDB Cluster.

My scenario: The drupal servers are connecting and sometimes the users are getting connection errors. I don’0t see anything at MySQL server level of any instance nor cluster problem. Let’s review the Routers.

On all MySQL Router servers, double check the config file for the log location and also the log level. At /etc/mysqlrouter/mysqlrouter.conf (default rpm install location):

[DEFAULT]
name=myrouter
user=mysqlrouter
..
..
logging_folder=/routerlog/log
..
[logger]
level=DEBUG
#level=INFO

I’ve changed my logger level to DEBUG which will give you a lot more info about connections and counters so you can see what’s happening …

[Read more]
Making my MySQL InnoDB Cluster safe from naughtiness

TL;DR: Make sure to run “SET persist_only disabled_storage_engines=’MyISAM’, persist sql_generate_invisible_primary_key=ON;” on all instances and restart each one in your MySQL InnoDB Cluster.

Ok, what does “safe from naughtiness” mean?:
– Anyone creating tables that aren’t InnoDB, as this doesn’t make sense, after all, it is an “InnoDB” cluster.
– Making sure all tables have a Primary Key (invisible or not).
– Making sure that my (invisible) primary keys are visible to the cluster as it will rightfully complain if they aren’t!

This basically means that once you’ve got it all up and running you won’t run into those horrible situations whereby someone, somewhere, creates a MyISAM table that didn’t have a Primary Key and thus leave you with a broken cluster.

Eg.

MySQL rtnode-01:3306 ssl JS > vlc.status()
{
 "clusterName": "VLC",
 "clusterRole": "PRIMARY", …
[Read more]
MySQL install ‘n’ config one-liners

Back again, now with MySQL installs. And this means using the MySQL repository this time around.

I’ve been installing and configuring InnoDB Clusters and ClusterSets and thinking about the Ansible and Terraform users amongst us, maybe one-liners might help someone out there.

So, what about if I share how to install the MySQL repo, install the MySQL instance, create an InnoDB Cluster, add a MySQL Router, create a ClusterSet, make sure the Router is ClusterSet-aware, and then test it out. And all via one-liners.

First up, obrigado Miguel for https://github.com/miguelaraujo/ClusterSet-Demo.

To simplify the command execution sequence, these sections aim to help summarize the technical commands required to create the whole platform. And on a default path & port configuration, to ease operational deployments for all those 000’s of …

[Read more]
InnoDB ClusterSet Deployment With MySQLRouter

This blog post will cover the basic setup of the InnoDB ClusterSet environment, which provides disaster tolerance for InnoDB Cluster deployments by associating a primary InnoDB Cluster with one or more replicas in alternate locations/different data centers. InnoDB ClusterSet automatically manages replication from the primary cluster to the replica clusters via a specific ClusterSet Async replication channel. If the primary cluster becomes inaccessible due to a loss of network connectivity or a data center issue, you can make a replica cluster active in its place.

Now, let’s see in detail how exactly we can configure the topology.

We have used the sandbox environment available via MySQLShell utility for this setup.

Environment

Cluster1:
         127.0.0.1:3308
         127.0.0.1:3309
         127.0.0.1:3310

Cluster2:
         127.0.0.1:3311
         127.0.0.1:3312
         127.0.0.1:3313

Router: …
[Read more]
Showing entries 1 to 5