Reputation: 43
I have two workers named as w1 and w2
W1 hosts activity A1.
If w1 goes down, is it automatically created on w2 to handle server fail over?
I tried it but it says ActivityTimeOut error and workflow failed.
Don't we have any option to handle fail over like this?
In this case, activity is not timed out. It is not responding to cadence service in expected time due to worker crash. Is this right way to address it as ActivityTimeOut? Instead, can't we address it something like WorkerCrash?
Upvotes: 0
Views: 323
Reputation: 6890
Cadence by default doesn't provide RetryOptions for an activity. So if it times out or fails the workflow will receive the failure and will fail if it is not handled. If you want for an activity to be retried you have to provide RetryOptions when invoking it.
Temporal by default provides RetryOption for any activity. So it is retried by default.
At this point, both Cadence and Temporal don't react to worker crashes directly. They rely on activity timeouts to detect any such failures. So specifying the correct StartToClose
timeout is essential when invoking an activity.
Upvotes: 0
Reputation: 2401
Yes, but you need to set the correct timeout and retry options: see concepts docs
and Java client docs and Golang docs
Upvotes: 0