Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write cluster failover, pool stuck with read-only cluster #2556

Open
francisco4challenge opened this issue Feb 23, 2022 · 1 comment
Open

Comments

@francisco4challenge
Copy link

I am using amazon aurora RDS in my application, with a cluster with 2 endpoints, read and write.
Using Pools, with the host as the cluster endpoint.
var pool = mysql.createPool(...); pool.getConnection( connection => connection.query())

When the primary writer endpoint failsover, the driver seems to be using the available reader endpoint, and insert/update fails (makes sense), but it never switches back to the writer, even when it becomes available.

Is there a way to handle these sittuations?

@dougwilson
Copy link
Member

Hi @francisco4challenge how does the failover work, exactly? I assume you have a DNS name in this module's configuration, is that right? Does RDS update the DNS at some point to change that DNS name to the new writer? Also, does it terminate the connection this module has to the reader when it fails over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants