Race Condition in Persistent FSM Actors During Deployment with Multiple Instances #1573
Unanswered
simonlucalandi
asked this question in
Q&A
Replies: 1 comment
-
It is indeed the case that Pekko Persistence works on the 'single writer' principle, so having new and old versions of the same persistence ID writing at the same time is not allowed. The solution here is indeed to introduce Pekko Cluster and use Cluster Sharding to manage the persistent entities: Cluster Sharding can make sure persistent entities are gracefully migrated to the new nodes during a deployment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Pekko community,
I am encountering a race condition issue in my application during deployments and would appreciate your help.
Background:
Issue:
I want to avoid downtime during deployments, which is why the old and new instances overlap briefly.
Is there a recommended pattern to prevent the race condition during overlapping deployments in a multi-instance setup?
Would Cluster Sharding be the appropriate solution for this issue, or is there an alternative (simpler) approach that could work with classic FSM actors?
Any suggestions, best practices, or guidance would be greatly appreciated.
Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions