We did a bit of testing on MySQL dual-master +keepalived high availability,
MySQL did the Gtid multithreaded replication, also did the optimization, finally our aim is to see, this high availability in high concurrency high load case, down the machine, finally see whether the data consistency between the two, after several tests, we let development write a small program, continue to write data in the database, We looked for about 6, 7 clients, while going to the database to write data, 30 threads per client, and then in a MySQL shutdown, see the final effect, one of the shutdown, another continuous write data, down the machine before the data is written up, And the machine above the keepalived if not preemption master, then the final data is consistent, successful, of course, there is data loss but the consistency of the guarantee, when this machine is back to synchronize log logs, we are each other to view the short-term data interval. The same test, but this time is a shootout mode, the final display of data is completely chaotic, seriously damaged the consistency of the data, so that the main mode of failure, and then several times by the method of cable extraction test several conclusions: in the case of high concurrency high load, MySQL master + Keepalived is best not preemption mode. This will guarantee a truly high availability.
MySQL main master +keepalived high concurrency High load condition test data consistency problem