This is possible to do, but lots of engineering. You can provide the experience of a single DB while each tenant can be placed in their own dedicated Postgres compute. This would help the application to stay the same while tenants are moved to independent computes (you can even move only a few tenants and leave the rest on a shared Postgres compute).
Nile is a Serverless Postgres that virtualizes tenants/customers. It is specifically built for SaaS companies similar to Figma https://www.thenile.dev/. I am the CEO of Nile.
I am the CEO of Nile, serverless Postgres for modern SaaS. We have built Postgres specifically for SaaS use cases. Take a look if it is interesting https://www.thenile.dev/
I am the CEO of Nile. We are serverless Postgres built explicitly for modern SaaS workloads. We do provide true serverless with no cold start time. We are able to do this because we made Postgres tenant aware. We hope to share more details on how we do it soon. https://www.thenile.dev/
Nile CEO here. We are specifically building Nile for modern SaaS which are multi-tenant applications. This lets us build tenant virtualization into the database to support tenant data isolation, performance isolation, query insights by tenants, flexible tenant placement (any region or dedicated database) for compliance and latency reasons, and even tenant-specific vector embeddings. We want to build a highly reliable database and have prior experience doing this. We are funded well to continue investing in this vision. Let me know what you consider critical to adopt a system like Nile.
Sorry to hear that. We understand each one will have a different set of problems. From our experience and talking to others, it is usually not as simple as adding a tenant_id column. You typically care about security from day one and want to be really careful how you isolate customers. You would also want to add user and organization management easily to the product. We have made these steps really easy without having to spend time writing complex permission logic and potentially buggy code. We also are able to provide query insights by tenant since the database understands tenant boundaries. There are also other things that I have mentioned in the blog. Having said that, if our users want autogenerated APIs, we would be more than happy to invest in it. We did have plans for it but in our conversations most did not bring it up. Hopefully, we can convert you to love Nile as we grow.
Yes, that is correct. In Nile, users are shared tables. They can belong to multiple tenants. In the case of the Github example, the organization is a tenant and users will be a shared table. Nile provides this out of the box. Will fix the usecase example to be more clear.
If you are building a static website (usually your website) or building a social networking product like Facebook, I would not recommend Nile. We recommend Nile for any usecase where you are serving multiple groups of users. In our experience, 95% of applications in the market today seem to fall into this category.
Sorry to hear your problems. We would be a great fit for your use case. We are serverless and support spiky workloads. You can map your clients to tenants in Nile. Let us know if anything changes on your side in the future. I would love to connect.
Great question. Nile supports shared tables for this purpose. Shared tables are regular tables that can be shared across all the tenants in another table. We have example use cases and how this works in Nile here https://www.thenile.dev/docs/tenant-sharing. Let me know if this works for you.
Agree. We will prioritize how to migrate from Nile. At the Postgres level we don't want any lock-ins. We would have APIs that simply SaaS workflows that users may choose to use.
We are going to support a database in the same server initially but could also provide dedicated server in the future. The nice thing about Nile's design is that we can provide different placements for different cost profiles with the developer experience of a single Postgres instance.
Currently, we support only AWS but do want to support other cloud providers. Technically, you can even have one DB that spans across cloud providers with your tenants, but we have not yet seen many use cases for multi-cloud.
W.r.t replicating data across tenants, could you give an example use case for it?
We do plan to support a bunch of extensions soon. We do support pg_vector at this point. Would love to know if you have any favorite ones. Also, could you share the use case for listen/notify? We currently do not support it but have plans for something that gives you the same functionality.
Nile CEO here. Here are a few use cases that can help you. We believe SaaS is 95% of new companies today and it is very broadly applicable. Happy to chat further if interested
1. GitHub helps a group of developers manage and deploy their code. Each Github organization is a tenant, and the developers within those organizations are users.
2. Salesforce or Hubspot helps sales reps manage their leads. Each company is a tenant, and the users are the sales reps.
3. Ring is a home security company that provides alarm services to different households. Each household is a tenant, and people living in a house using their service are users.
4. Toast is a platform to help build software for restaurants. The restaurants are tenants, and the employees of the restaurants are the users.
Nile lets you do this without incurring the operational complexity of managing multiple databases. We let you place the virtual tenant DB either on one multitenant Postgres DB or a dedicated Postgres. So, you can actually create a dedicated one for each of your tenant in Nile but interact with them like a single Postgres instance. We take care of schema updates across them, client-side routing and metadata management