|MySQL High Availability|
Authors: Charles Bell, Mat Kindahl and Lars Thalmann
The next two chapters address the heart of replication – for high availability and scale out. The chapter on high availability includes short Python scripts for tasks such as finding the best slave, and slave promotion, while the scale out chapter covers topologies and techniques for getting better read scalability on large data sets. Both chapters are clear and well written, and probably make it worth buying the book. The following chapter, on sharding, is also good. There’s a useful chapter on more advanced replication topics such as the best way to promote slaves to masters, avoiding database corruption in the case of a crash, and different sorts of replication (multisource, multi-threaded and row-based). The first half of the book ends with a chapter on using the MySQL Cluster tool for high availability.
The second half of the book is less about the concepts of high availability, and more about the day-to-day tools for managing and keeping track of a highly available database. There’s an introductory chapter that tells you what you should be monitoring, then another introducing the different tools for monitoring activity and performance. This chapter ends with a nice little set of checklists of what might be causing different problems such as slow queries, slow applications and slow replication.
The next two chapters look in detail at different elements for monitoring – the storage engine and replication. InnoDB and MyISAM are given equal billing in the chapter on storage engine monitoring. Given there are 50 variables that control the behavior of InnoDB and 40 status variables that can tell you about it, you’re not going to get a complete picture of what you can do in 20 pages, but the main elements – Show Engine, monitoring logfiles and the buffer pool – are covered, along with troubleshooting InnoDB. In contrast, there are few things you can monitor on MyISAM, so the pages on it concentrate largely on the key cache, optimizing disk storage, and monitoring memory use.
There’s a good chapter on replication troubleshooting looking at problems on the master and slaves, and a nice summary of best practices, some of which is obvious but all well worth doing. A chapter on ‘protecting your investment’ is actually about backups and disaster recovery, and the book finishes with chapters on MySQL Enterprise Monitor and the MySQL utilities.
Perhaps the most useful part of the book is in the first appendix. This consists of a list of replication tips and tricks, and has ideas for running, diagnosing, repairing and improving replication. While not all will be applicable, they give good ideas about how to handle the problems if they do occur.
While the technical material is good, one thing that irritated me about this book was a short story running through the book at the start of each chapter about a clueless database administrator learning about MySQL. I realize the authors were attempting to liven up the usual intro of ‘this chapter looks at how to use load balancing and ways of improving recovery in replication’, but the adventures of Joel (the administrator) and his long suffering boss were just distracting. It seemed as though the authors felt the topic was too boring to keep the reader’s attention without some sort of ‘sweetener’, but I just kept hoping one of the server towers would fall over and crush Joel so we could get on without him.
However, if you can ignore the further adventures of Joel, this is a good way to learn about MySQL high availability. It won’t teach you everything, but it will take you a long way into the topic. The authors are good at including examples in SQL, Python and PHP, and overall I’d recommend it.
|Last Updated ( Wednesday, 06 August 2014 )|