You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to run a spring state machine in an AKS cluster with multiple pods running the same application instance. The state machine is long-running and might take over 12 hours to complete. State machine configuration looks like the below with internal state transition every 15 minutes and triggers state change if required conditions are met in the internal state action.
I am using state machine service along with JPA persister.
How do I ensure that the long-running state machine starts running on another pod if any one of the pod crashes or restarts ?
First of all, let me tell you that I have no affiliation with Spring State Machine or Development, so please took what I write as a certain grain of salt...
Spring State Machine is great for many use cases but I am not sure it fits your use case, as much as I know Spring State Machine has no concept of unit of work, so several Spring State Machines would coordinate for fulfilment of your scenario, so it will pick and continue the work of another instance if that other instance, in your case k8s pod, terminated...
That level of cluster coordination are provided from other Frameworks like
I want to run a spring state machine in an AKS cluster with multiple pods running the same application instance. The state machine is long-running and might take over 12 hours to complete. State machine configuration looks like the below with internal state transition every 15 minutes and triggers state change if required conditions are met in the internal state action.
I am using state machine service along with JPA persister.
How do I ensure that the long-running state machine starts running on another pod if any one of the pod crashes or restarts ?
transitions
.withExternal()
.source(S1).target(S2).event(S1_to_S2).and()
.withInternal().timer(Duration.ofMinutes(15)).action(a -> checkAndTriggerEvent());
The text was updated successfully, but these errors were encountered: