You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
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
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)
The text was updated successfully, but these errors were encountered: