FeatureFuel
2

API specifying which Database to connect to

Source: supabase/supabase#13674 · opened by @chaffeqa
As a multi-tenant application, we chose to make a separate database (not schema) per tenant. This has relegated us to being thread-unsafe since we must be connected to the correct tenant per request, and therefore have the overhead of connecting/disconnecting on every request (Ruby on Rails codebase). There are thousands of databases, but most share a database host instance. Having a persistent connection per app instance to each database doesn't scale on both the app and database instance level. It would be awesome if we didn't have to connect/disconnect at an application level and instead just pass a header (or SET SCHEMA simililar call) to the load balancer. The load balancer could maintain a connection per database since that is scalable, and simply direct the app queries based on the header / session of the app instance. Happy to contribute! Been looking for a DB load balancer to build this functionality into. I feel there must be other multi-tenant apps out …

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests