several server one database

31 views
Skip to first unread message

Jasmina Beca

unread,
Dec 10, 2020, 3:19:14 AM12/10/20
to nflow-users

Hi,

I wrote a POC which is working perfectly :-)

But before we want to deploy it, I wanted to ask a detail where I currently haven't an idea how to test.

What happens when we deploy our application with an embedded nflow engine at several servers, when they all use the same database? Can it happen that two server starting processing the same workflow instance?
Is there anyone has any expierences with it?!?

Regards

nflow-users

unread,
Dec 10, 2020, 4:14:35 AM12/10/20
to nflow-users
Hi,

Thank you for your questions and happy to hear that you have found nFlow interesting!

This is one of the fundamental properties of nFlow:

"Only one dispatcher at a time may fetch the same workflow instance to be processed"

For more details on how this works, have a look at https://github.com/NitorCreations/nflow/wiki/Workflow-dispatcher

So as long as your database transactions work, two (or more) servers cannot start processing the same workflow instance.

We have lots of experience about this, as it is the most common setup in all nFlow production deployments (at least all that I know of) to have at least 2 engines using the same database.

br, Edvard
Reply all
Reply to author
Forward
0 new messages