Replies: 3 comments 3 replies
-
@apanicker-nflx @kishorebanala @aravindanr Any feedback on this proposal? |
Beta Was this translation helpful? Give feedback.
-
hello @venkag , we are reviewing it. |
Beta Was this translation helpful? Give feedback.
-
@venkag Thanks for taking the time to write this proposal. Sorry for the delay in the response. We had several discussions regarding this proposal. As you have mentioned, this proposal mainly deals with data isolation between tenants and not fairness across tenants or within tenants. We do see that The roadmap item about tenant isolation is mainly geared towards fairness, avoiding noisy neighbors and providing the ability to set resource limits so any one or few workflows/tenants can use up all available resources. We believe data isolation can be achieved by using a layer on top of Conductor and does not need to be part of the core offering. Other users have done similar things, an example is this talk https://www.youtube.com/watch?v=noVJ1owfTR0 from the recent meetup. |
Beta Was this translation helpful? Give feedback.
-
Background
There were two discussions (here and here) on this topic. While the general idea is the same, I would like to add more details in this discussion.
Proposal
Support for multi-tenancy is planned as part of the Roadmap and this proposal is a step towards realizing the plan.
There are two main problems to solve w.r.t multi-tenancy. They are:
This proposal focuses only on
Tenant Isolation
and does not discussFairness
.In general, this is a complicated topic and it touches a lot of modules. Things to consider:
x-tenant-id:<tenant-id>
)./<tenant-id>/<rest-of-the-path>
)./path?x-tenant-id=<tenant-id>
)Workers can be designed to be tenant aware or unaware. This is where fairness comes into picture. In this proposal all scheduled tasks are treated equal irrespective of which tenant they belong to.
To begin with most entities within conductor will have an additional field called
namespace
. These entities are:Task
,TaskDef
,WorkflowDef
,WorkflowTask
,Workflow
. Thenamespace
within the entities will help with the isolation.namespace
is generic term and can be used forTenant Isolation
.Just adding
namespace
to the classes is not enough, they have to be populated (set
) appropriately and have to be looked up with thenamespace
context (get
). The flow typically, is this:MetadataService
,WorkflowService
must be enhanced to include additional APIs with additional parameternamespace
. To maintain backward compatibility, new interface methods with additional parameter will have default implementation to call the base method ignoring thenamespace
parameter.ExecutionDAO
(andExecutionDAOFacade
),MetadataDAO
must be enhanced to include additional APIs with additional parameternamespace
. To maintain backward compatibility, new interface methods with additional parameter will have default implementation to call the base method ignoring thenamespace
parameter.PollDAO
andQueueDAO
will not be modified as they are not required to be tenant aware. Workers will not be tenant aware. All tasks will be treated equal.RerunWorkflowRequest
,StartWorkflowRequest
will include additional fieldnamespace
.TaskMappers
need to be enhanced to populatenamespace
when new tasks are created.Implementation
We have an implementation that we are using internally that makes all the above changes excluding the changes required for
REST
module. Our implementation also hasPostgres
related enhancements and usesColumn based isolation
. For other database implementations, backward compatibility is maintained by ignoring thenamespace
field.If you are OK with the above proposal, I can raise a PR with these changes.
@kishorebanala @apanicker-nflx @aravindanr
cc: @taojwmware
Beta Was this translation helpful? Give feedback.
All reactions