Masstransit saga .net core service high availability

37 views
Skip to first unread message

Pavel Pesetskiy

unread,
Apr 1, 2019, 3:15:54 AM4/1/19
to masstransit-discuss
I have .NET core service that is hosting the Saga/Automatonymous logic that has SQL db as saga storage
Can I run two instances of the service in failover mode somehow. So that one will read primary and if it is down another one will start working?
See attached image for details.
question_saga_failover.png

Chris Patterson

unread,
Apr 1, 2019, 9:44:28 AM4/1/19
to masstrans...@googlegroups.com
You can run them both at the same time on the same queue, which will load balance across the running instances.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/68d05286-511c-4845-b96b-9aa70ad3697b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pavel Pesetskiy

unread,
Apr 1, 2019, 3:28:31 PM4/1/19
to masstransit-discuss
thanks, is there any consideration regarding concurrent saga read/write into persistent store?

Chris Patterson

unread,
Apr 2, 2019, 9:22:19 AM4/2/19
to masstrans...@googlegroups.com
Most saga repositories support optimistic concurrency, some support pessimistic as well. Which you use depends upon your use case.

You can also use the in-memory outbox and retry policies to handle concurrency conflicts. It's highly recommended that you assign identifiers for sagas early in the message flow, and not within the saga itself (to avoid duplicates). You should have a unique constraint on your saga storage to avoid duplicates. There is more information available in the documentation.

On Mon, Apr 1, 2019 at 2:28 PM Pavel Pesetskiy <peset...@gmail.com> wrote:
thanks, is there any consideration regarding concurrent saga read/write into persistent store?

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages