AWS Lambda RDS 连接池 [英] AWS Lambda RDS Connection Pooling

查看:47
本文介绍了AWS Lambda RDS 连接池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试将 AWS X 射线 JDBC 拦截器添加到我们的 lambda 函数中,为了添加 JDBC 拦截器,我们添加了最大活动和最大空闲连接为 1 的 Tomcat JDBC 数据源.连接没有得到重用,我们得到了很多连接已关闭错误".我们观察到的另一种模式是 Lambda 需要将近 10 分钟才能从 Aurora DB 刷新连接.有没有人用 Lambda.(Java 8) 和 RDS (Aurora) 成功实现连接池.

We are trying to add AWS X ray JDBC interceptor to our lambda functions and in order to add JDBC interceptor we have added Tomcat JDBC datasource with max active and max idle connection as 1. Connections are not getting reused and we are getting lot of "connection already closed error". Another pattern we observed is Lambda is taking almost 10 minutes to flush the connection from Aurora DB. Did any one successfully implemented connection pooling with Lambda.( Java 8) and RDS (Aurora).

推荐答案

我认为您对 RDS 中的连接池的呼声刚刚到达了 AWS ......干得好!

I think your cry for connection pooling in RDS has reached AWS just now... Here you go!

RDS 代理 最近已在 AWS ReInvent 中推出.

RDS Proxy for Aurora/RDS has been launched recently in AWS ReInvent 2019.

这篇关于AWS Lambda RDS 连接池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆