Projects using Prisma Client can be deployed to many different cloud platforms. Given the variety of cloud platforms and different names, it's noteworthy to mention the different deployment paradigms, as they affect the way you deploy an application using Prisma Client.
Each paradigm has different tradeoffs that affect the performance, scalability, and operational costs of your application.
Moreover, the user traffic pattern of your application is also an important factor to consider. For example, any application with consistent user traffic may be better suited for a continuously running paradigm, whereas an application with sudden spikes may be better suited to serverless.
Long-running process (PaaS)
Your Node.js process is continuously running and handles multiple requests. Your application can be deployed to a Platform-as-a-Service like Heroku, Koyeb, as a Docker container to Kubernetes, or as a Node.js process on a virtual machine.
Node.js processes of your application (or subsets of it broken into functions) are started as requests come in.
Serverless environments have the concept of warm starts, which means that for subsequent invocations of the same function, it may use an already existing container that has the allocated processes, memory, file system (
/tmp is writable on AWS Lambda), and even DB connection still available.
Typically, any piece of code outside the handler remains initialized.