HNHacker News
TopNewBestAskShowJobs

infra_dev

119 karma · joined June 22, 2022

CEO Nile - Serverless Postgres for modern SaaS

https://www.thenile.dev/

submissionscomments
infra_dev··on How Figma's databases team lived to tell the scale
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).
infra_dev··on How Figma's databases team lived to tell the scale
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.
infra_dev··on Ask HN: Cost Effective Managed Postgres for Next.js App
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/
infra_dev··on Nile – We raised money to build Serverless Postgres for modern SaaS
Nile CEO here. We raised money to build a serverless Postgres offering to build and scale SaaS applications. Happy to answer any questions.
infra_dev··on AWS cancels serverless Postgres service that scales to zero
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/
infra_dev··on Nile Templates – the quickest way to build modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Hey kiwicopple, big virtual hi. I am a fan of your work.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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?

infra_dev··on Nile: Serverless Postgres for modern SaaS
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.
infra_dev··on Nile: Serverless Postgres for modern SaaS
I do also want to mention that we don't fork Postgres. We have built tooling around Postgres using extensions and gateway layers on top of it.
infra_dev··on Nile: Serverless Postgres for modern SaaS
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.

infra_dev··on Nile: Serverless Postgres for modern SaaS
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
infra_dev··on Nile: Serverless Postgres for modern SaaS
Thanks sai. Great to hear from you! I have been following PeerDB and you folks are doing great work.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. You can place tenants on multitenant DB or a dedicated Postgres DB. Placing the tenants on multitenant DB is the default. This has no cold start time since the instance/container is shared. If you choose to place a tenant on a dedicated tenant DB, you would have cold time of a few seconds. We are building this as we speak and will have more numbers to share soon. However, if you have chosen to place a tenant on a dedicated DB, these typically would be critical customers who are actively using the DB and may never want the instance to go down. We are exploring provisioned compute tokens for this purpose.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. I agree, and I am with you. I can vouch that this is not done with any malicious intent. We were not ready for HN yet but here we are. Our goal was to work with initial users to really polish the product before we open it up to everyone. We understand this would discourage some to not join and we hope to get them back once we are available for general availability.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. Nile will promise to make the experience of moving out of Nile really easy. This is one our core product principles. We want users to stay for the value we provide.

Nile user permissions are optional. You can decide to use any third-party provider for it. We are in the design phase for permissions at this point. We would love to get your feedback to understand more about your concerns https://github.com/orgs/niledatabase/discussions/159

infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. There are many approaches to doing multitenancy. - You can create one physical DB per tenant - You can place multiple tenants on the same DB

Both approaches have pros and cons. This is exactly what Nile is solving. We want users to not worry about all the operational complexity of picking a choice. You can choose any approach in Nile.

In Nile, the tenant DB is a virtual concept. You can choose to place it on a multitenant DB along with all the other tenants or choose to place it on a dedicated DB. Nile provides a single experience irrespective of your choice and takes care of all the operational complexity. We also go one step further and also let you place a tenant in any location worldwide but still have one Postgres experience.

You can read more about it here https://www.thenile.dev/docs/tenant-management https://www.thenile.dev/docs/tenant-placement

Would love the feedback

infra_dev··on Nile: Serverless Postgres for modern SaaS
Could you send me a note on ram@thenile.dev. Would love to understand your use case better.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Azure SQL Server Hyperscale architecture gives you plenty of scale but does not do anything to help with managing tenants.

I will explain what Nile tries to do. Happy to follow up.

The most foundational element in SaaS is a tenant. It makes a lot of sense to build this core concept into the database. Imagine having a lot of virtual tenant databases that can be co-located on one physical Postgres (multi-tenant) for better cost, and some of them can be placed on a dedicated database for better isolation. The virtual tenant DBs can be located anywhere on the planet for low latency or compliance. The client can route to the right tenant seamlessly without routing logic in the application.

Isolating tenants into their own virtual DBs is great, but you will also want to be able to share data across tenants where it makes sense. Backups should be available for each tenant, and it should be possible to restore them instantaneously. Schema changes should be applied seamlessly across all the tenant DBs, and it should also be possible to do staged rollouts for different tenant tiers. While supporting all this, all the standard SQL capabilities should work across the tenants for admin operations. All the standard Postgres tooling should work. You want the experience of a single Postgres.

This is what Nile tries to achieve. A model that gives you fine-grained control over your tenants. You create, scale, locate, pay all by tenants.

infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. Yes, you can store embeddings per tenant and search for it. You can read more about vector embeddings and how we support it here https://www.thenile.dev/docs/ai-embeddings
infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. Nile abstracts away compute machines and provides an experience where you can easily scale up or down based on the load you push.

Specifically, Nile lets you do the following - Create a database and start querying it. Nile takes care of adding capacity to tenants as workload increases. - Pay for what you use. You will only pay for what you use. We have plans for pricing where you can pay based on usage per tenant. This will ensure your business value is aligned with the cost of your database. For example, a customer on your free tier may not be an active user and you would not pay for them in Nile. - We have built multitenancy into Postgres and a gateway layer that routes. This helps us to scale to zero with instant availability when you want to scale back up.

- You can create even a million tenants if you have that many customers. - We have built connection pooling into Nile. This helps to provide limitless connections as you grow

infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. Yes, this is docs, examples and our website right now. Our background is in open source for the last 15 years. We helped build Apache Kafka and grow the community to a very successful one. We believe open source should be done well and hope to consider it once we have the bandwidth to provide DIY ways to run Nile.
infra_dev··on Nile: Serverless Postgres for modern SaaS
Nile CEO here. We do offer serverless Postgres but that is where the similarity ends.

We’re the first database that virtualizes tenants into the database. This enables seamless tenant isolation, per-tenant backups, and placement on multi-tenant or dedicated infrastructure anywhere on the planet. You can do all this with the experience of a single Postgres.

Here are some examples that can help you to understand the type of use cases. Most applications are multi-tenant and this is what we help with.

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.

Happy to chat more. My email is ram@thenile.dev

Page 1 of 2Next →