Comments (2)
Same concerns here.
Even thought using redis speed-up the queue, when you imagine of having 1k tenants that they have thousand queues each, things will not work as it would in a non multi-tenancy project/website.
Let's make an example possible case where there are 1k tenants that each has 50 queue items which is not far from real world project. There will 50k queue items in the redis db and one queue worker! of course we can make the queue worker to execute multiple queue items at the same time, but how much FR? 1k concurrents? And it is still a big mess regarding queue orders per tenant.
The best and the implementation that a multi-tenancy package/project needs to have, in my opinion, is queue and queue processor per tenant, dedicated for each tenant. not shared. however, still with one worker process to keep the server's resources usage as low as possible, not one process per tenant.
While i was writing this and thinking more and more on this, i found out that the current implementation might be the best and the only possible way while there are known issues too!
from tenancy.
I don't think this is fundamentally different from single-tenant apps in any way. It's the same problem of queue scaling.
It doesn't matter if you have 50 jobs from 1k tenants, or if you have one app that dispatches 50 000 jobs.
I think the solution is to just add more queue workers. I don't think queue per tenant is a good idea because in your example you'd have to manage 1000 queue workers that are fully coupled to the tenant and would need to be managed as such — create a worker when a tenant is added, delete a worker when a tenant is removed etc.
It's probably best to treat this the same as a single-tenant app — just add more queue workers as your queue volume grows.
from tenancy.
Related Issues (20)
- Tenant could not be identified on domain 127.0.0.1 HOT 1
- Issue with global cache HOT 1
- Issue with the cache in multithread HOT 2
- Queued Notifications are not tenant aware and produces wrong Action links HOT 2
- tenants:run with jobs combined with queue:work keeps multiple database connections open HOT 12
- SQLSTATE[HY000] [2002] Connection refused
- bug in Request data identification HOT 1
- any_name.host_name shows my tenant landing page HOT 1
- Tenant cannot be created HOT 1
- i can't getting any data from users table HOT 2
- Additional (foreign ID) column not updated in Tenant table HOT 2
- migrate-fresh command don't consider mysql-schema.dump file HOT 13
- Random Database [central] not configured errors HOT 10
- Cache::increment('key'); return null HOT 10
- Weird dates in sqlite tenant database HOT 3
- Caching the existance of a tenants database HOT 2
- Help: Tenant schedule HOT 1
- Laravel spatie permissions issue HOT 4
- Foreign key configuration for `BelongsTo` or `HasMany` relationship. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tenancy.