Archive for category high availability

DBJ – Mult-master MySQL Improves Manageability

Multi-master MySQL, with the MMM management software brings a whole host of new features, and manageability to your MySQL deployments.   Run backups, alter tables, perform upgrades all without slowing down your production users.

Read more at Database Journal – Using Multi-master MySQL To Get A Leg Up On Database Performance

Tags: , , , , , ,

DBJ: Introduction to Multi-Master MySQL

This month on Database Journal we talk about multi-master MySQL using circular replication to achieve high availability.

Read more at DatabaseJournal – Intro to Multi-Master MySQL

Tags: , ,

DBJ – Heartbeat Setup

In the last of our three part series on MySQL high availability we discuss the Linux Heartbeat project, and how it can be used to automate failover between two MySQL databases.

Heartbeat exposes a virtual IP address for use by the database, and manages it as well.  In the event that one server becomes unavailable, Heartbeat will  revoke primary control of DRBD from that node, hand over the IP address to the alternate node, mount the DRBD device, and start MySQL.  MySQL’s InnoDB engine will then perform crash recovery, rollback uncommitted transactions, and startup.

Read the full article at Database Journal – DRBD & MySQL, Heartbeat Setup

DBJ: DRBD & Virtualbox Setup

In part two of our article on DRBD and High Availability, we take you step-by-step through setting up Sun’s Virtualbox software, creating a couple of VMs, and then installing CentOS on those.  These two virtual Linux boxes then serve as two nodes in our DRBD mirrored disk setup which we use as a platform to install MySQL.

DRBD, MySQL and the Virtualbox Setup – Database Journal

Keep on the lookout for our third part in the series next month.  In that issue we’ll explain how the Linux Heartbeat project can be used to control the whole setup, and provide automatic failover in the event that one node goes down.

DBJ: DRBD Makes Excellent Low-cost HA Soln for MySQL

With all the trouble keeping MySQLs built-in replication running, some folks are looking for alternatives.  DRBD provides a distributed block level device, which can provide the sort of database mirroring we need, below the filesystem.  That makes it transparent to MySQL, but nevertheless a great complimentary solution.  In this article we’ll discuss the pros and cons, and then part two will take you step by step through a basic setup.

Read the article on Database Journal – DRBD and MySQL – Excellent Low-cost HA Solution

DBJ – Advanced MySQL Replication – Improving Performance

 Our latest article over at Database Journal is hot off the presses.  Advanced MySQL Replication – Improving Performance discusses some of the best ways to improve the performance of your MySQL slave setup.  If the slave is constantly getting further and further behind the master database, we discuss a number of techniques which may help you bring it under control.

review: High Performance MySQL 2nd Ed.

I just finished reading the recently released 2nd Edition of High Performance MySQL by Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy Zawodny, Arjen Lentz & Derek Balling.  I’ve posted a review here on Amazon.

Wow, that’s quite a list of authors, but when you look at the material, you see why.  This book is a very indepth look at the MySQL server.  Intended for the intermediate to advanced DBAs and developers who want to know the inner workings of the server, as well as how to use many of it’s advanced features.

For instance the chapter on replication was quite good.  Given that you probably setup replication in five minutes, and are wondering weeks or months later why it’s not working, this chapter will give you some answers.  Using non-deterministic functions?  Mixing MyISAM and InnoDB tables in the same transactions?  Seeing some errors in your slave error log that don’t make sense?  After  finding out that there is something wrong, you may be more surprised that your slave can be out of sync with the master, and not even let you know about it.  The chapter recommends Maatkit’s mk-table-checksum as an assistant to identifying these problems.

All in all the book is superb, so take a look at the review for details, and go get yourself a copy!!

MySQL Replication in a Box

Recently I wanted to setup a little MySQL sandbox where I could hack away at MySQL with reckless abandon.? A sandbox is different than a test environment, it’s usually one which is very breakable.? You want to be able to break things, or rather take them completely apart and put them back together.? It’s the only way to understand all of the moving parts.

So searching google, I happened upon Giuseppe Maxia’s Replication Playground. It basically installs into an unprivileged directory, one master, and three slaves.? You can then test out various scenarios. Read his blog entry.

It is trivial to install, however I encountered some issues with MySQL 5.0, which caused me some troubles.? I sent him my feedback, and comments, and it looks like he has rereleased it as the MySQL Sandbox. Good stuff.