MPP is a MySQL State Manager for MySQL server failover negotiation and
It is intended to be used as a 2nd party management application
used in combination with any
load balancing management software. It was initially designed to be used in
conjunction with Linux Virtual Server, and later F5 Networks BigIP, but can
work with any load balancer that can utilize external check scripts or
accomplish an HTTP REST call.
MPP now integrates with MySQL Proxy using an injection mechanism.
This software allows the configuration of MySQL
servers into a pool. The configured pool is managed based on a logic that is
assigned to it. MPP currently supports generic fail-over logic, and has
intentions to eventually support generic cluster logic.
MPP began it's origins in the 2nd half of 2004, and was released into internal
production as proof-of-concept in 2005. Two and a half years later after
testing in a variety of production environments with integration in several 2nd
party controllers, and sights set on MySQL Proxy integration, it is released.
MPP is written in PERL, released as Open Source Apache 2 license which is compatible with GPL 3.
MPP Web Service
The MPP Web Service and Web Client is currently released as gamma. It provides
a Web 2.0 interface to MPP cache files. The polling daemon currently keeps
monitoring data current in the cache, and the Web Service makes the results,
currently as read-only, available to any Web 2.0 able client via REST.
A Web 2.0 Client dashboard is bundled with the Web Service. The Web Client
uses XSLT to transform the MPP data into an initial dashboard, and JSON to
keep monitored objects in the dashboard updated from the Web Service.
Both Web Service and Client use XML::TreePP and
the later module which makes any PERL hash/array ref structure accessible via
an XPath-like accessor methodology.
The Web Service will be merged into the MPP core at a later date when it
The PERL requirements for using MPP is as follows:
MODULE MIN VERSION AVAILABLE
----------- ----------- --------------
CGIbasic 0.010 MPP Bundled
Config_info 1.00803 MPP Bundled
LogBasic 0.00.003 MPP Bundled
Storable PERL >= 5.8 PERL Bundled
Net::HTTP PERL >= 5.8 PERL Bundled
Net::Ping PERL >= 5.8 PERL Bundled
IO::FILE PERL >= 5.8 PERL Bundled
DBD::MySQL 2.9006 CPAN
DBI 1.46 CPAN
The PERL requirements for using the MPP Web Service is as follows:
- Web Service
- Web Client
This software was recently imported from our internal engineering lab,
and has been merged with modification recomendations from our real world implementation.
The resulting code available here has been tested and considered ready for release.
Read an overview in articles on MPP and State Management on the MySQL Developer Zone:
View the MPP
View the MPP Subversion repository online.
View the MPP Web Service
Get the code
You can download the source code from Subversion.
- Subversion trunk: https://dev.codepin.org/svn/mpp/trunk/mpp
- Subversion tags (revisions): https://dev.codepin.org/svn/mpp/tags/mpp
- Latest Revisions:
mysql-polld daemon-like script is created for the replacement of the cron
option for polling nodes. Initial testing for integration with MySQL Proxy
0.6.0 has been completed. Various fixes and updates.
mpp.lua file has been updated to address an issue I refer to as "all_node_down", where all Proxy backend
servers are down and MPP cannot connect to load its evaluations into Proxy. This version also address the issue where
you could not supply a blank password to
mpp-proxyadmin.pl. This version also contains a work around for
MySQL Bug #32464 for DBD::mysql.
Integration with MySQL Proxy Tested. Added a |
mysqlproxy host module into the API set,
mpp.lua Lua script for MySQL Proxy,
and created an admin application
mpp-proxyadmin.pl to manage MPP evaluations from MPP cache into Proxy internals.
First release. Integration with Linux Virtual Server and F5 Networks BigIP tested.
The code for MPP Web Service is available for download:
There is a plan in progress that MPP will be combined into MySQL Proxy. The plan is multi-phased:
Purpose: MPP has the ability right now to supervise master fail-over.
The physical execution of a master fail-over is still reliant upon a controller like MySQL Proxy.
- MPP revision 1.0.1 gave us MySQLProxy+MPP combination by handshake - getting them to talk to each other.
- MPP Revision 1.0.3 gave us a daemon to perform the polling, rather than relying on cron for implementation
Depending on how MySQL Proxy evolves, one of the two will happen:
- A newer web 2.0 enabled polling manager daemon process
- Polling managed by Proxy, and manageable through a web 2.0 interface
- We want these load balancing methods in MySQL Proxy using Lua, and relying on MPP for the logic:
- round robin (this is the default, and currently the only implementation)
- read-only versus read-write, SQL query load balancing (this is the next desired implementation)
- weighted connections
- least connections
- weighted least connections
- Depending on the future development of MySQL Proxy, the following may happen:
- Parts of MPP converted in Lua Snipits using PERL
Lua Snipts integrated into MySQL Proxy.
- Merging of MPP into MySQL Proxy without external dependencies, with the following attributions:
- MPP-as-Lua still packageable into a MPP PERL-library using Inline:Lua for 2nd party integration into other controllers.
- MPP Clients can/will be written for managing MPP logic in a running MySQL Proxy implementation of MPP.
(This allows the administrator to say, "Uh.. change your mind to make this decision instead."
Ex: "I don't care if the STANDBY is in [replication] FAILure, promote it to ACTIVE and fail-over to it anyway.")
MPP was written to act as a plugin, to add intelligence to 2nd party controllers. MPP negotiates
MySQL node States of ACTIVE, STANDBY, FAIL and Statuses of OK, INFO, WARN, CRITICAL, FAIL in a transitional flow.