[heroes] Status report: Galera cluster
Hi TL;DR: - Galera cluster is upgraded to latest version from server:database - backups are done each day (03:00 UTC) by mybackup.infra.opensuse.org now - backup retention is planned to be 30 days (calculation still ongoing) Long version: The Galera cluster inside the openSUSE Heroes network was one of the last things I finished in 2017. I like to thank everyone who was keeping the services up, running and up-to date! As the load on the cluster went high, when the daily backup was triggered on one node - and my old script did not 100% guarantee that all backups were consistent, I decided to do some changes. Now - as before - there are three nodes building one Galera Cluster (in the end, this means that there are 3 MariaDB nodes that keep each other in sync permanently). But I put another node right beside this cluster, running a bare MariaDB installation. This node is not joined into the cluster - but instead syncs itself as "slave" from one of the Galera nodes. To be more robust, this slave is running in read-only mode, which forbits any local changes on the database. I first tried to sync the node via the new "Global Transaction ID"[1], which would allow to easily change to another Galera node. But this is currently not possible, as all Galera nodes use different IDs. So I ended up to bind "mybackup" to "galera1" as slave directly. I already changed the firewall and other settings on all nodes, so a switch over is possible in general, but would need a "CHANGE MASTER TO..." command, including binlog file and position information. So this can only be done manually for the moment. On mybackup, I installed and configured the mysql-backupscript package (see openSUSE:infrastructure). This package is already enhanced with pre- and post-scripts, that stop the slave process before the backup starts - and start it again once the backup is finished. This finally allows to have completely consistent backups for each InnoDB database running on the Galera cluster. Please note that MyISAM databases are NOT synchronized between the Galera nodes. So every database that should run there needs some inspection. These points are open: * check final space for backup (might either need an extension of the backup disk - or less backups * check, if we might be able to get a unique GID from each node, to allow the mybackup host to use the load-balancer in front for the backup - instead of relying on one single Galera node * Testing complete restore With kind regards, Lars -- [1]: https://mariadb.com/kb/en/gtid/ -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
On Sun, 5 Jan 2020 22:19:59 +0100 Lars Vogdt <lars@linux-schulserver.de> wrote:
TL;DR: - Galera cluster is upgraded to latest version from server:database - backups are done each day (03:00 UTC) by mybackup.infra.opensuse.org now - backup retention is planned to be 30 days (calculation still ongoing)
- Added mysql.infra.opensuse.org port 3308 for read (select) SQL queries. Those are also distributed between the Galera nodes (with higher Prio for galera3 and galera1, while galera2 get's write traffic). If "your" application allows to send select statements to another machine than insert/update statements, please use this new port. - Did some additional tuning of all 3 Galera nodes. Helpfull scripts are 'mysqltuner.pl' and 'tuning-primer.sh'. Both are packaged in mysql-tuning-scripts (together with some additional files) and installed on each node. Please note that blindly following the output of those scripts will not really help - but they give good directions where to look at. - The configuration of the 3 Galera nodes is manually synchronized via 'csync2' at the moment. This can be saltified later, once the systems does not need much tuning any longer. Regards, Lars -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
participants (1)
-
Lars Vogdt