Is there any AWS RDS Utility to Manage Master Slave mysql db with read write splitting?
-
09-01-2021 - |
题
I am looking for a solution for production which can manage the read and write splitting on master and slave connection as i can't affford to define multiple connection string for R/W in whole application.
解决方案
AWS does not have a service that provides this.
Transparent, intelligent read/write splitting is a Hard Problem™ because there are so many details that can go wrong, such as queries that use user-defined variables, which aren't deterministic unless the state of the variables is maintained across multiple connections... inconsistent reads and read-after-write due to replication lag... and many others.
The only solutions for now are third-party products like Maxscale and ProxySQL, unless you are using a connector library or ORM that manages such things for you (assuming such things exist).