aws-mysql-jdbc icon indicating copy to clipboard operation
aws-mysql-jdbc copied to clipboard

Readonly connections Read-replica load-balancing

Open dstaviss opened this issue 3 years ago • 2 comments

Hi, A question. We currently use "jdbc:mysql:replication" driver with Aurora to achieve read-only connections balancing between multiple read replicas. As mysql driver has no knowledge of Aurora topology we have to list the write and all read replica enpoints explicitly, which is a chore and when the failover happens it screws up the application, but provides for an excellent read performance and even utilization of replica instances. Is this supported by AWS driver or are there plans to implement it? Would be nice if AWS driver can automatically send connections to relevant replicas based on the topology and write/read-only connection type. IMO without this functionality Aurora is not worth it for real production workloads Thx

dstaviss avatar Jul 08 '22 17:07 dstaviss

Hello @dstaviss,

Thanks for reaching out. For visibility, we're tracking read/write splitting as a feature request here: https://github.com/awslabs/aws-mysql-jdbc/discussions/192. In addition, read/write splitting is a feature that the team is currently working on.

When the feature is closer to being completed, we'll provide some updates and set expectations to when a release would happen.

Thanks,

Matthew

hsuamz avatar Jul 08 '22 19:07 hsuamz

Thanks Matthew, I checked out #192 - this is a different issue really, I am talking of a feature similar to https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-source-replica-replication-connection.html but Aurora topology aware so the master and replicas enpoints are dynamically updated. The responsibility is on the developer to set conn.setReadOnly(true/false); to indicate the type of the connection. Thx David

dstaviss avatar Jul 08 '22 23:07 dstaviss