hi there, wondering if it is idiomatic to deploy p...
# orm-help
j
hi there, wondering if it is idiomatic to deploy prisma as a serverless function or better to keep the node process alive? is there a recommended deployment (containerized process) or function or no recommendation as startup overhead is minimal and the application dictates the runtime requirements? worth pointing out i'm just getting started with prisma but didn't want to lose any runtime caching or other performance benefits by opting into functions by default
r
@Joe Graham 👋 You can deploy Prisma as a serverless function, but direct connection to the DB is not recommended. It would be better to use something like PgBouncer that manages the connection pool. Also you might want to experiment with the
connection_limit
described here that suits your serverless requirements. Else, it’s totally fine to go with a long running server that also uses containers. You can simply create a Dockerfile like this and deploy it to the platform of your choice.
a
@Ryan i was also thinking of using the Heroku directly with nextjs serverless api's & s3 for file upload. is there any recommendation on easy implementation in this direction.
j
awesome @Ryan tyvm!
r
@Akshat Sharma what would Heroku be for if you’re using the Nextjs serverless API?
👍 1