Giter VIP home page Giter VIP logo

Comments (2)

sergiyvamz avatar sergiyvamz commented on May 28, 2024 1

Hello @21kyu,

Thank you for giving the AWS JDBC Driver for MySQL a try!

It seems that logic you're trying to achieve is supported. You may consider to use jdbc:mysql:replication:// protocol and do necessary adjustments to your configuration and to your application code. More details are available at: https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-source-replica-replication-connection.html.

Would you mind to provide more details about the context key that you use for your implementation of AbstractRoutingDataSource? Does this context key change according to whether read or write operation is needed? Assuming the context key has a proper value for both read and write cases, the rest of the logic relies on data sources. You may also need to make sure that replica data source is configured with replication protocol and a proper list of nodes.

If you use an Aurora MySQL cluster, you may consider to use cluster reader endpoint to connect to a random replica node.

from aws-mysql-jdbc.

wqld avatar wqld commented on May 28, 2024

jdbc:mysql:replication:// worked fine the way I wanted it to.
However, there is a delay between wrier/reader, so it was not suitable for my business logic.
I tested it in several diffrent modes, and as a result I decied to only use the Fast Failover feature via jdbc:mysql:aws:// protocol.
Thank you!

from aws-mysql-jdbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.