DEV Community

Discussion on: Using Prisma to Address Connection Pooling Issues in Serverless Environments

rehanvdm profile image
Rehan van der Merwe

Will this be able to solve the long startup time, high memory usage and just generally slow queries when used in Lambda?

2color profile image
Daniel Norman

Hey Rehan,

While there are several reasons that lead to long start up time and slow queries when using Prisma in Lambda, The Prisma Data Proxy should help alleviate some of those. For example:

  • The bundle size is smaller as the Prisma engine is not packaged anymore into the Lambda function
  • Queries can be slow due to DB connection initialisation on Lambda start. The Prisma Data Proxy improves those by keeping the connection to the database open.
  • High memory usage should also be reduces as we no longer start an additional process for the Prisma engine in the Lambda function.

Have you tried the Prisma Data Proxy out?