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

Graceful poolcluster management with AWS Aurora #2953

Open
sshevlyagin opened this issue Aug 13, 2024 · 0 comments
Open

Graceful poolcluster management with AWS Aurora #2953

sshevlyagin opened this issue Aug 13, 2024 · 0 comments

Comments

@sshevlyagin
Copy link

I'm using mysql2 with typeorm and nestjs to connect to an AWS Aurora Serverless v2 MySQL database.

The connection is configured through a cluster FQDN and there's a dedicated FQDN for the read/write and read only endpoints, e.g. foo-cluster.cluster-foo333barzzz.us-west-2.rds.amazonaws.com. For this setup to work with high availability it's important if the actual IP behind the cluster changes the application retries and uses the new IP.

Right now, I'm using the following pool cluster options

{
    `removeNodeErrorCount`: 500
}

which I think has the desired effect because it takes less than 500 retries for the FQDN to resolve to the new IP. Unfortunately, that means the client (a web app) may get a few errors and have to hit F5 a few times during this situation.

Is my understanding correct? Is there a better mechanism for handling this gracefully for the client?

For example, with python sqlachemy I have pool_pre_ping and pool_recycle

(This is similar to the discussion in #1103 but hopefully more specific)

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

No branches or pull requests

1 participant