Managed PostgreSQL: Handling Multi-Tenancy

Posted October 12, 2020 346 views

My frontend and backend are hosted as serverless functions on Vercel. I am using a multi-tenancy approach, where every client get’s it’s own database. This means however, that I run out of connections pretty quickly, because AFAIK you need a new connection for each database. I am thinking to switch to digital ocean, because of the managed connection pooling, which should decrease the amount of connections needed for each database and I guess I could setup the connection pool via the API for each new database. However there is still the hard limit of connections.

My question is if my assumptions are right, or how I should go about the database topic with my use case and if there is a possibility to increase the max_connections of my psql db

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!