I’m brand new to database clusters (this is my first one), I just fired everything up yesterday and I began testing.
I have 3 database nodes all running Percona-XtraDB-Cluster with an HAProxy load balancer, after doing some research it appears that there may be some issues with using auto_increment. The problem is we don’t have a choice since we are using pre-packaged applications such as WHMCS and Multicraft.
After doing some testing I have found that auto-increments are skipping 2, which will cause problems with our application.
Example:
| 1093 | Node 1 write |
| 1096 | Node 1 write |
| 1099 | Node 1 write |
| 1102 | Node 1 write |
| 1105 | Node 1 write |
| 1108 | Node 1 write |
| 1111 | Node 1 write |
| 1114 | Node 1 write |
| 1117 | Node 1 write |
| 1120 | Node 1 write |
| 1123 | Node 1 write |
| 1126 | Node 1 write |
| 1128 | direct write |
| 1131 | direct write 2 |
Node 1 writes are writes from an automated PHP script running a while loop with a 0.5 second wait in between.
Direct writes are simply insert statements ran on the console for the master node.
What can we do about this?