Hi all,
Maybe this has little or no interest for the MySQL PHP community, but we have done a fork of the mysqlnd_ms load balancing plugin extension. The plugin has been ported to PHP 7.* and new cool functionalities have been added. It has been tested on PHP5.x (5.5, 5.6) and PHP7.x (7.0, 7.1, 7.2) with no ZTS and ONLY ON LINUX (centos 6 but i hope it works on any linux distribution). It is not on PECL and requires compilation from sources. We use it to completely avoid replication lag application problems and multi-master write conflicts management, transparent migration (with no application changes) from stand-alone MySQL servers to async MySQL clusters. Documentation was also partially revised but still not completed. The code can be found here
https://github.com/sergiotabanelli/mymysqlnd_ms , a brief description follows:
* PHP7.x porting
* New QOS session consinstency and transaction id injection
* Server side read consistency (mysql >= 5.7.6 with --session-track-gtids=OWN_GTID)
- Mysql native built-in read consistency
- PHP session_id read consistency enforcing
* Server side write consistency (mysql >= 5.7.6 with --session-track-gtids=OWN_GTID)
- Multi master write consistency
- Multi master write consistency logical partitions
* Client side read consistency
- Distinct master connection for client side read consistency and gtid injection
- Client side transaction id injection with memcached mysql plugin
* Simple client side write consistency
- Multi master write consistency
- Multi master write consistency logical partitions
* New config_dir ini directive for connection based json config files
* New master_on ini directive for rw splitting
* New inject_on ini directive for transcation id consistency tracking/injection
* New mysqlnd_ms_set_trx and mysqlnd_ms_unset_trx php functions for application based transaction tracking
Best regards
Sergio