Prisma accepts environment variable as database connection string - this Next.js app is ran on Vercel on two instances. Each instance accepts different db connection string - in one case it is a simple managed DB from Digital Ocean, in other case it's a PG bouncer powered managed DB on Digital Ocean.
- https://rdb-serverless-load-testing.vercel.app
- https://rdb-serverless-load-testing-pg-bouncer.vercel.app
k6
directory implements load tests to be run against these two branches.
In case of plain DB serverless functions quickly exhaust connection limits of the DB which results in failed requests thus in failed threshold of K6 testing.
In case of PG bouncer powered db everything works as expected with little performance downsides.
Using serverless oriented DB with serverless functions - Dynamo, Aurora
Using Prisma Data Proxy