As you know, one of the most eagerly waited features was released with MySQL 8.2: the transparent read/write splitting.
In this post, we’ll look at how to use it with MySQL-Connector/Python.
Architecture
To play with our Python program, we will use an InnoDB Cluster.
This is an overview of the cluster in MySQL Shell:
JS > cluster.status()
{
"clusterName": "fred",
"defaultReplicaSet": {
"name": "default",
"primary": "127.0.0.1:3310",
"ssl": "REQUIRED",
"status": "OK",
"statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
"topology": {
"127.0.0.1:3310": {
"address": "127.0.0.1:3310",
"memberRole": "PRIMARY", …
[Read more]