Multi-master with round robin reads
I have a Multi-Master mysql 8.0.20 replication setup, and I am using the same config as the example here. But, it does not seem to round robin the selects? I have a simple php page that is doing nothing but querying select @@hostname AS HOST;. Every refresh shows the same hostname, which is the writable master.
How do I get it to round robin?
Those examples are from original mysqlnd_ms! Did You set mysqlnd_ms.multi_master=1 in your ini file?
I am curious! How do You manage write conflicts in your multi-master setup??
I do have that set. I'm not sure how MySQL 8 replication handles write conflicts in a multi master setup. It seems though that even though it is multi master, only one is writable.
Sorry, I missed the Every refresh!! That means new connection on every query, so round robin is always restarted, round robin can be applied only on the very same mysql connection! I am pretty sure that You will get same result also for configurations witch include slaves. So if You need to balance distinct connections use random instead of roundrobin.
On write conflicts management
New features of mysqlnd_ms can manage and avoid write conflicts! But it needs a memcached server! Check my gist https://gist.github.com/sergiotabanelli/ce992b630d08a0bc7a9cec7c577638f5 and https://github.com/sergiotabanelli/mysqlnd_ms/blob/master/docs/BOOK/QUICKSTART-AND-EXAMPLES/SERVICE-LEVEL-AND-CONSISTENCY.md