roadrunner-bundle icon indicating copy to clipboard operation
roadrunner-bundle copied to clipboard

Multitenancy: Kerner-per-Tenant option

Open eXsio opened this issue 3 years ago • 2 comments

Hi

Great stuff here :) one question: would it be possible to add some sort of KernelProvider? By default it would just return the same instance, but it would open up a possibility to have multiple Kernel instances and return a specific Kernel based on an env configuration, or a request param (for example we could have a TenantKernelProvider that would ensuer each Tenant has its own Kernel).

That would also allow to have codnitional services - depending on the Tenant.

eXsio avatar Dec 12 '21 09:12 eXsio

Hi! Thank you for the kind words :)

I think this could lead to some hard to debug issues, because the Worker will still have been initialized by the original kernel.

What is your use case for having multiple kernel?

Baldinof avatar Dec 29 '21 13:12 Baldinof

The use case would be to be able to run the same code for different clients. The configuration (like for example DB urls) and the modules/bundles enabled could be different on a per-client basis. I know that I can just create separate instances for Roadrunner for each Client, but I was wondering if this could be somehow addressed by having just one Worker pool.

eXsio avatar Dec 29 '21 14:12 eXsio