Aurora Serverless MySQL - Downtime during scaling event

0

We are currently testing an Aurora Serverless v1 database with a Tomcat application server. The JDBC connection pool is managed by Tomcat. We have setup the database to use forced scaling (using the default timeout). As expected, we have noticed that connections with running queries (that don't complete within timeout period) are killed off during the scaling event with remaining connections being maintained. However, occassionaly, we notice that all connections to the database are dropped. The database cannot be accessed from any method (application, MySQL workbench or MySQL command line). The database does recover the connectivity after a few minutes. In this instance, the logs do not show that the database has restarted. It appears to be network connectivity issue.

Has anyone else seen or experienced this issue?

asked 2 years ago963 views
1 Answer
0

Hi there,

I understand that you are using forced scaling for the database and occasionally you notice that all connections to the database are dropped. 

There are basically 2 methods of scaling used by Aurora Serverless v1, mainly Autoscaling and Manual scaling.

During autoscaling, AuroraServerless v1 resets the EngineUptime metric. The value of the reset metric value doesn't mean that seamless scaling had problems or that Aurora Serverless v1 dropped connections. It is simply the starting point for uptime at the new capacity. For more information regarding metrics, see reference [1].

When it does need to perform a scaling operation, Aurora Serverless v1 first tries to identify a scaling point, a moment when no queries are being processed. Aurora Serverless v1 might not be able to find a scaling point for the following reasons:

  • Long-running queries
  • In-progress transactions
  • Temporary tables or table locks To increase your Aurora Serverless v1 DB cluster's success rate when finding a scaling point, it is recommended that you avoid long-running queries and long-running transactions. See reference [2] for more information on working with Aurora Serverless v1.

In order to scale Aurora Serverless v1 DB cluster capacity manually, you can follow the steps provided in the documentation provided in reference [3].

For more detailed information when using Aurora Serverless v1, see reference [4].

Please also take note that Aurora Serverless cannot be accessed through MySQL Workbench because an Aurora Serverless DB cluster cannot be assigned a public IP address, you can only access an Aurora Serverless DB cluster only from withing a Virtual Private Cloud (VPC) based on the AWS VPC service. This is explained thoroughly on the documentation provided in reference [5].

References:

[1] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/MonitoringAurora.html

[2] https://aws.amazon.com/blogs/database/best-practices-for-working-with-amazon-aurora-serverless/

[3] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.setting-capacity.html

[4] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v1.how-it-works.html

[5] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions