My presentation from Fosdem

Last weekend I attended my first Fosdem conference. It was great to finally visit the conference that might be the biggest open source conference in the world. It's also an amazing experience how our Belgian friends pull off such a magnificent event purely with volunteer effort. You might say the conference itself is very much open source: free entry, created by volunteers. Organizers estimated that this year there were 7000+ attendees on campus. A hard data point was over 2300 simultaneous devices connected to Wifi.

I presented an introduction to Galera Cluster for MySQL. Due to problems with my personal laptop, I had to resort to an old version of the same presentation I had uploaded to Slideshare last year. (This is a variation of the old rule: The best way to backup your code is to publish it online as open source...). These are the slides:

The PDF is originally for a 60 minute presentation, so even if you saw me in Brussels you will find plenty of more info in these.

Since I only had a PDF, there were a few details I couldn't add to these slides, but explained verbally:

Bootstrapping the first node safely

For starting the first cluster node you use wsrep_cluster_address="gcomm://". The slides explain already that you should never leave it like that in my.cnf, as it will do bad things if the MySQL node happens to restart at some point. Thanks to Jay Janssen from Percona we have recently realized that there is actually no need to ever put this dangerous string into my.cnf at all. It turns out that even if it is not widely supported, you can actually send mysqld options via the init script. This is known to work with Galera on Centos:


service mysql start --wsrep-cluster-address="gcomm://" # start the first node in a cluster

This will override the cluster address that you put into my.cnf, that can now always contain addresses of other nodes.

Codership is working on further hardening against this usability pitfall and in the future we will probably deprecate the use of an empty "gcomm://" string altogether, to avoid mistakes. But more on that when we actually have working code.

As it happens, Oli Sennhauser just blogged about another approach to bootstrapping a Galera Cluster.

wsrep_incoming_addresses

I also pointed to the manual page to show the new status variable wsrep_incoming_addresses. This contains a list of hostnames that are currently part of the cluster. If you're unsure which nodes have actually succeeded in joining the cluster, this is perhaps the easiest way to find out. The string can also be used as input to various load balancers.

Thanks to Frederic and the team for organizing such a great track that properly included as many "MySQL and friends" from across the community as possible. Thanks to everyone who came and talked with me about your production or evaluation use of Galera, it was interesting to hear from you. Thanks to Luis and Lars for interesting discussions around replication in General, thanks to Justin for sharing your wisdom on sharding, and thanks to Kenny for a really good stake! (I really needed it.)

File attachment: