Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Pooling #983

Open
fernandocoronatomf opened this issue Feb 15, 2021 · 2 comments
Open

Connection Pooling #983

fernandocoronatomf opened this issue Feb 15, 2021 · 2 comments

Comments

@fernandocoronatomf
Copy link

fernandocoronatomf commented Feb 15, 2021

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

  • hyn/multi-tenant version: 5.4.
  • laravel version: 6
@mbnoimi
Copy link

mbnoimi commented Feb 21, 2021

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.

@fernandocoronatomf
Copy link
Author

@mbnoimi Yeah, same deal but I am using MySQL.
Would be great to have some insights from other people facing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants