-
Notifications
You must be signed in to change notification settings - Fork 345
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
[Workflow] How to run the workflows "distributed"? #1245
Comments
@paule96 This is true, only the application that hosts a workflow can start one (and use only activities that have also been registered in that application). To have other Dapr applications interact with them you must expose a new endpoint that can be called via, for example, Dapr service invocation. That endpoint can then start/stop/manage the workflow. With respect to scaling, I believe the note you mention refers to spreading execution across multiple replicas of the service (that registers the workflow). That is, there is no affinity for running a workflow's activities to the same node that orchestrates the workflow itself. |
Hi @philliphoff, thanks for the explanation. So the actual |
The activities will only run on the application (instances) in which they've been registered (along with the workflows themselves), but they will (should?) spread across those instances. |
@philliphoff This makes sense. Thanks for your explanation and clarification 👍 |
Hi Dapr team,
I lately take a look into the new workflow feature of dapr.
And as far as I understand is an activity in an workflow not more then an actor.
And a workflow itself is like a component around the activities.
So for me every call of
CallChildWorkflowAsync
orCallActivityAsync
goes to the sidecare. This looks into the placement lookup table (or updates his own copy) and send this request to the correct instance / node that hosts thisActivity
orworkflow
to run it.It's also written in the
CallChildWorkflowAsync
documentation the following documentation:To make my issue easy to understand I created an example repo.
The example repo contains basicall 3 applications:
daprWorkflowDistributedIssue.ApiService
WeatherApi
WeatherAPI
sample with one single easy endpoint/weatherforecast
daprWorkflowDistributedIssue.DaprWorkflow1
CallWeatherWorkflow
WeatherApi
daprWorkflowDistributedIssue.DaprWorkflow2
CallWeatherWorkflow
The problem is now that the workflow
CallWeatherWorkflow
works just okay. But when the workflowGetWeatherAndMood
tries to callCallWeatherWorkflow
you will get the following response:It looks for me that I can only interact with workflows / activities that are hosted in the same instance of the application. But I can't call to other workflows hosted somewhere else in my dapr application.
This creates for me also the question how to scale these workloads or even better how to scale the activities. In special in the
Fan-Out
pattern.Hope someone can help me to understand, what i miss here :)
The text was updated successfully, but these errors were encountered: