read replicas with legacy code that doesn't properly separate queries

0

For applications that are not built to use read replicas and send writes to a master connection, is there an option to have the read replicas pass on all write queries while handling reads themselves?

The multi-master mode might work for this but it sounds risky if the code doesn't divide writes between the nodes to avoid conflicts.

已提问 4 年前181 查看次数
2 回答
0

I was working on read-write separation (Aurora 4 MySQL) for quite some time and as far as I can tell read replicas do not have such an option.

If the implementation of query routing is not an option, then you may consider using third-party RW splitters, like ProxySQL, Apache Sharding Sphere (https://shardingsphere.apache.org/document/current/en/features/read-write-split/) or
Heimdall proxy (https://aws.amazon.com/blogs/apn/using-the-heimdall-proxy-to-split-reads-and-writes-for-amazon-aurora-and-amazon-rds/).

HTH

epNIck
已回答 4 年前
0

Excellent options, thanks!

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则