Multiple instances of step running at the same time
See original GitHub issueI’m having an issue where multiple instances of the same step run “at the same time”.
I was wondering what are the chances of multiple instances of my application (running with load-balancer) hitting the database and getting the same RunnableInstances?
I looked into the code base and saw the function below, which seems to not work well with multiple instances, right?
private async process(self: PollWorker): Promise<void> {
self.logger.info("pollRunnables " + " - now = " + Date.now());
//TODO: lock
try {
let runnables = await self.persistence.getRunnableInstances();
for (let item of runnables) {
self.queueProvider.queueForProcessing(item, QueueType.Workflow);
}
}
catch (err) {
self.logger.error("Error running poll: " + err);
}
try {
let events = await self.persistence.getRunnableEvents();
for (let item of events) {
self.queueProvider.queueForProcessing(item, QueueType.Event);
}
}
catch (err) {
self.logger.error("Error running poll: " + err);
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AWS Step Function: How can i invoke multiple instances of ...
The simplest solution is to make one more step called invoke10Lambdas and use it from your choice. Pseudo code for your step function...
Read more >Executions in Step Functions
Each Step Functions state machine can have multiple simultaneous executions, which you can initiate from the Step Functions console , or by using...
Read more >Concurrent execution of the same AWS Step Function
Let's say I want to use a Step Function to orchestrate a data workflow that starts with responding to a particular type of...
Read more >Preventing Duplicate Executions in Step Function - YouTube
Sometime we might have a hard requirement to prevent executing this state machine twice with the same input.We can use the default feature ......
Read more >AWS Step Functions: Parallelism and concurrency ... - YouTube
In this session, viewers learn to harness the power of parallelism to complete the same workload in less time. Three methods of serverless ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The persistence provider you choose has nothing to do with the concurrency providers you use. Currently, the only ones available are for Azure - https://github.com/danielgerlag/workflow-es/tree/master/providers/workflow-es-azure
I am working on a Redis implementation, should be ready in a week or two.
It’s already been published
https://github.com/danielgerlag/workflow-es/tree/master/providers/workflow-es-redis