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.
Comments
Similar requests
Authenticated API Endpoint to Restart / Toggle Database On & Off Remotely
2 votes · 0 comments
Allow selecting a schema in database connection string settings
4 votes · 0 comments
How to synchronize databases, documents to vector databases
3 votes · 0 comments
NoSQL (Document) Database Alternative?
1 vote · 0 comments
Feature request: Disable all write access to the database by client (API/functions/storage/etc.)
2 votes · 0 comments
No comments yet.