Better HN
topnewbestaskshowjobs
Log inSign up

infra_dev

119 karma · joined Jun 22, 2022 (4y ago) · 85 submissions

CEO Nile - Serverless Postgres for modern SaaS

https://www.thenile.dev/

Submissions

31.

Pgactive – Active-Active Replication in Amazon RDS Postgres(infoq.com ↗)

2 points · by infra_dev · 3y ago · discuss

32.

AI embeddings support for SaaS use-cases in Postgres(thenile.dev ↗)

1 points · by infra_dev · 3y ago · discuss

33.

Sharing data across multiple tenants in Postgres(thenile.dev ↗)

3 points · by infra_dev · 3y ago · discuss

34.

Nile monthly launch – pg_vector is now available on Nile(thenile.dev ↗)

8 points · by infra_dev · 3y ago · discuss

35.

Nile tenant virtualization – Implementing multitenancy in Postgres(thenile.dev ↗)

1 points · by infra_dev · 3y ago · discuss

36.

Tenant virtualization in Postgres with five lines of code(thenile.dev ↗)

5 points · by infra_dev · 3y ago · discuss

comment 3y ago · link · parent

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.

38.

Nile Templates – the quickest way to build modern SaaS(thenile.dev ↗)

36 points · by infra_dev · 3y ago · 3 comments

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Hey kiwicopple, big virtual hi. I am a fan of your work.

comment 3y ago · link · parent

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?

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

Thanks sai. Great to hear from you! I have been following PeerDB and you folks are doing great work.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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

comment 3y ago · link · parent

Could you send me a note on ram@thenile.dev. Would love to understand your use case better.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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
123