On Github moritzheiber / devpar-apprentice
or
Apprentice is tiny server application (under 300 lines of ruby code) that determines the integrity of a running MariaDB/MySQL slave or MariaDB Galera master-master cluster member and responds to HTTP requests on a pre-defined port, depending on the state of the server it is checking on.
Slaves always lack a little behind => Transaction in Checkout, read-write issues Read-write splitting should be done, transactions/checkout only on master
MariaDB Galera cluster
MariaDB Galera cluster => Codership Integrated into the regular MariaDB distribution
ruby (2.x), rubygems
eventmachine
mysql2::EM
$ gem install apprentice
gem2deb also works, some packages might be provided in the future
$ apprentice --server localhost --user root --password password --type mysql
© knowyourmeme.com
better docs™
rspec tests
global configuration
logging handler
this presentation (including notes etc.): https://moritzheiber.github.io/devpar-apprentice