How to solve Lambda and RDS database connection issues for Nodejs Application | by Faiq Ahsan | Medium
Going serverless with Lambda frees your from the pain of managing and scaling related tasks on your own and also saves you a-lot of money but only running when it needs to but it does come with some issues of its own. One of it is the database connection management as the lambdas are stateless. Let’s see how do we solve it. Let’s address the major issue when invoking a lambda thousand of times concurrently, when a request invokes a lambda it creates a container having the runtime and all the dependencies then it runs the lambda function inside it. Now if it’s processing the request and another request comes like during peak hours, then it creates another container having its own isolated environment. Hence each new container having its own environment opens up a new connection with the database without sharing the existing environment with other lambda containers.. Hence our concurrent open RDS db connection exceeds very fast which are limited e.g around 800 for t3.large instance. It i
How to solve Lambda and RDS database connection issues for Nodejs Application Faiq Ahsan 5 min read · Jul 14, 2021 -- Listen Share Press enter or click to view image in full size “In the name of Allah most beneficent and merciful” Going serverless with Lambda frees your from the pain of managing and scaling related tasks on your own and also saves you a-lot of money but only running when it needs to but it does come with some issues of its own. One of it is the database connection management as the lambdas are stateless. Let’s see how do we solve it. Let’s address the major issue when invoking
Explore this link on the map →related reading
- The real serverless compute to database connection problem, solved - Vercelvercel.com
- More Than DNS: The 14 hour AWS us-east-1 outage – Jonathon Belotti [thundergolfer]thundergolfer.com
- Managing an RDS Proxy - Amazon Relational Database Servicedocs.aws.amazon.com
- Scaling PostgreSQL to power 800 million ChatGPT users | OpenAIopenai.com
- Databases in 2024: A Year in Review // Blog // Andy Pavlo - Carnegie Mellon Universitycs.cmu.edu
- How I Dropped Our Production Database and Now Pay 10% More for AWSalexeyondata.substack.com
- Databases in 2025: A Year in Review // Blog // Andy Pavlo - Carnegie Mellon Universitycs.cmu.edu
- The best ways to save money on Lambda | theburningmonk.comtheburningmonk.com
- Using API Gateway WebSockets with the Serverless Framework | Serverless Frameworkserverless.com
- What is AWS Lambda? - AWS Lambdadocs.aws.amazon.com
- AWS Lambda Documentationaws.amazon.com
- Sharding with Amazon Relational Database Service | AWS Database Blogaws.amazon.com