hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.08k stars 2.77k forks source link

Any issues with updating Hasursa schema via multipe, simulatenous users? #3407

Open ElixirMike opened 4 years ago

ElixirMike commented 4 years ago

We are modeling out an application and looking to use Hasura. The use-case here needs to support tens of thousands of users, each making their own DB /permission/table/relationship changes. Each of the users (in the thousands), will have their tables in a separate schema (on same DB though).

My my research, Postgres should be handle this type of volume (These are small tables). But, will Hasura work if there are literally donzes if not hundreds of updates to the schema at the same time? I'm concerned about performance, but also concerned their might be record contention with multiple updates from multiple users?

IF this won't scale, what are the recommendations on how to achieve this? It's possible to create a new DB dynamically per new user, but is is possible to spin up new instance of Hasura dynamically on the same machine? Would I need to have separate containers per each Hasura instance?

Thanks for your feedback.

rikinsk commented 4 years ago

@ElixirMike In most typical apps the schema is not updated in production. So this is a slightly unusual use case. Could you share a bit more info about what you are trying to achieve and how. e.g. how would the users be modifying the schema?

ElixirMike commented 4 years ago

I agree this is not a typical use-case, but it's the heart of the app we're looking to build. Essentially the core use-case is to enable clients to define their own tables, relationships, etc dynamically & instantly..and then provide access to their users. A simple way of thinking about this is mimicking of how a user interacts with a a spreadsheet. They dynamically add columns, remove columns, add data, etc, with instantaneous feedback. This is what we're trying to achieve, with the idea this will support tens of thousands of "clients"/users.

We have this working in a proto-type phase and the behavior works as expected and is fast/no lag, but this is for 1 user. My concern/question is about scalability and issues we might encounter and should design for in order to scale to tens of thousands. of users.. I did connect with someone from your team via Discord channel, and they said performance/scalability shouldn't be a problem, but I'd like to ensure I'm not going down a path that will ultimately fail at larger loads.

Let me know if you need more info.

Also, I Do have a call scheduled with someone from your team tomorrow morning in regards to support options.

MStumpp commented 4 years ago

Any updates on this? I have a slightly different use case and would love to know whether such use cases (schema updates) have been identified as not suitable for Hasura.