Giter Club home page Giter Club logo

Comments (13)

olitomlinson avatar olitomlinson commented on September 25, 2024

@odzhurik

Right now Dapr Workflows is not stable when running the Workflow with more than 1 instance of the App, as it causes dead-locking on the underlying Actor Reminder sub system. This is likely what you're hitting against.

The good news is that this is a well known issue, and maintainers & contributors have been actively working for several months on a new sub-system which will replace the current poor performing Actor Reminder subsystem. The preview release of the new sub-system will be in the next dapr version, which will likely release next month (June) - Keep an eye out for the 1.14 release :)

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

I tried with 1.14.0 rc2 but the error still occurs.
I tested with 2 and 3 application instances and with Redis and Microsoft SQL Server state stores but without success.
With Redis I get
error saving reminders partition and metadata: ERR Error running script (.....): @user_script:14: user_script:14: failed to set key actors

and with MS SQL I get

error saving reminders partition and metadata: mssql: Error number 2601 in the THROW statement is outside the valid range.

Does the error occur with any state store type?
Does anyone know when this will be fixed?

from dapr.

olitomlinson avatar olitomlinson commented on September 25, 2024

@NunzioCar

Have you enabled the new SchedulerReminders preview feature which forces the Actor reminder system to use the new scheduler control plane service? You must do this if you want to try horizontal scaling of workflow App instances.

image
https://v1-14.docs.dapr.io/operations/support/support-preview-features/

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

@olitomlinson thanks for the suggestion.
I hadn't enabled the new SchedulerReminders preview feature. I'll try it.

Have you an example of the scheduler configuration in a self-hosted enviroment (docker-compose).
I suppose that i should add the daprio/scheduler container and configure the sidecar.

from dapr.

yaron2 avatar yaron2 commented on September 25, 2024

@olitomlinson thanks for the suggestion. I hadn't enabled the new SchedulerReminders preview feature. I'll try it.

Have you an example of the scheduler configuration in a self-hosted enviroment (docker-compose). I suppose that i should add the daprio/scheduler container and configure the sidecar.

We are working on enabling scheduler in the latest 1.14 CLI, I'll keep you posted here once that's done so you can try it out

from dapr.

olitomlinson avatar olitomlinson commented on September 25, 2024

@olitomlinson thanks for the suggestion.

I hadn't enabled the new SchedulerReminders preview feature. I'll try it.

Have you an example of the scheduler configuration in a self-hosted enviroment (docker-compose).

I suppose that i should add the daprio/scheduler container and configure the sidecar.

Yep, I've got a compose file with 3 instances which works fine :)

Check it out here

https://github.com/olitomlinson/dapr-workflow-examples/blob/main/compose-3-instances.yml

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

@yaron2 @olitomlinson great, it works fine.
Thanks a lot, you saved me!

There are no errors and the workflows was completed successfully but I see a loss of performance:

with a workfow that call other child workflows and with 1000 parallel workfow executions
the system complete the workflows in

  • ~2min with 1 application instance and without scheduler
  • ~5min with 1 application instance and with scheduler
  • ~5min with 2 application instance and with scheduler
  • ~5min with 3 application instance and with scheduler

So with the scheduler it is slower and the application doesn't scale.
Should I scale the scheduler?

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

@yaron2 @olitomlinson with 1.14 rc5 there are no errors and there is a performance improvement; it's like the version without scheduler, ~2min instead of ~5min.
Great job,
thanks

from dapr.

olitomlinson avatar olitomlinson commented on September 25, 2024

@NunzioCar Thanks for confirming!

This matches my testing as well (RC5 has increased the speed greatly, compared to previous RCx)

from dapr.

olitomlinson avatar olitomlinson commented on September 25, 2024

@NunzioCar

I see you were testing with 1000 parrallel workflows? Can you roughly describe what each workflow instance is doing? i.e. is it fanning out to multiple Activities and then doing a whenall ? if so how many activities, and how long does each activity take to produce a result?

Also, what environment were you testing this in? Docker compose? Kubernetes on your dev machine? Kubernetes on a real cluster? If a real cluster, how many nodes?

Also, what Actor state store were you using? i.e Redis? Postgres? and was that running locally on your machine? or a cloud service like AWS RDS / Azure SQL etc?

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

@olitomlinson it's a real business case (I'm taking a risk by using dapr workflow that is in beta version), the workflow contains 3 child-workflow levels with activities that manage files, activities that read & write into DB, activities that invoke remote services etc. It's not a workflow for a benchmark purpose.

Anyway there are 2 child workflow that execute 100 child workflows in parallel (await Task.WhenAll(parallelTasks)), for 10 times.

I tested this workflow with Visual Studio 2022 with docker-compose. Dapr was not configured in HA mode and I used Redis as state store, configured into the docker-compose.

from dapr.

olitomlinson avatar olitomlinson commented on September 25, 2024

Hey @NunzioCar - Can you test again now that 1.14.1 is out? There's been a lot of positive change since rc5 :)

from dapr.

NunzioCar avatar NunzioCar commented on September 25, 2024

@olitomlinson thanks, I will test it as soon as possible.

from dapr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.