Database Connection Pooling with Aurora Serverless & Lambdas

0

Hi - I am having issues with high latency in connecting lambdas and a Postgres Aurora Serverless cluster via the Data API. After some research, it looks like Connection Pooling is the best solution. However, it looks RDS Proxy (the AWS native connection pooling solution) doesn't support Aurora Serverless. Does anyone know a workaround for this (while still using Aurora Serverless)?

已提問 2 年前檢視次數 2899 次
2 個答案
0

Hello AWS Customer,

Yes you are correct, RDS Proxy is not supported for Aurora serverless as of now. As the document: https://aws.amazon.com/blogs/database/best-practices-for-working-with-amazon-aurora-serverless/ mentions, You have two choices with Aurora Serverless: manage your own application connection pooling or use the Amazon RDS Data API. The Data API reduces the effort of managing database connections or connection pools. The Data API doesn’t require a persistent connection to the DB cluster. Instead, it provides a secure HTTP endpoint, backed by a connection pool. So, you can choose between them for connection management. From the above document, apart from application connection pooling and data api section, you can also refer sections such as Minimizing pause and resume time, Pre-warming.

For more information on Data API, you can refer: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html

I hope this helps! If you are facing latency issues with your lambdas or any other issues, i would recommend you to open a new support case with AWS Premium support so the latency can be troubleshooted to see if there any issues.

AWS
Kunal_M
已回答 2 年前
0

The restriction on using RDS Proxy applies to Aurora Serverless v1, but you can use RDS Proxy with Aurora Serverless v2. Data API support for Serverless v2 is currently (January 2024) available for the PostgreSQL engine but not for MySQL.

Serverless v2: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html

Data API: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html

johrss
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南