Open fernandocoronatomf opened 3 years ago
I asked a similar question too but in much simpler way.
Can I use tenancy for multi-tenant app uses a single connection pool? I don't want to create a connection pool per tenant (just want a single connection pool for multi-tenant) In PostgreSQL usually we use a schema per tenant which means the app uses a single database with multi schemas.
@mbnoimi Yeah, same deal but I am using MySQL. Would be great to have some insights from other people facing the same problem.
Hey guys,
This isn't as much a feature request, but a question about connection pooling. This package is amazing for data segregation and it integrates greatly with laravel queues, caching, artisan, etc.
The problem we're having is that the application grew a lot and we allow clients to self onboard themselves, which creates a tenant (database schemas) for each time they do that.
I might be wrong but as far as I've researched, enabling connection pooling in Laravel will create a connection for every schema we have. Assuming we have 400 tenants, then it would be 400 connections at any given time, which might be expensive.
I am wondering if anybody has any tips regarding this issue or any reading that can further help?
Thanks
Information