Skip to content

Commit

Permalink
Describe abort/inactivity timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Dec 14, 2023
1 parent 1c346f4 commit e72340f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/services/invocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,15 @@ $ curl -X DELETE http://localhost:9070/invocations/T4pIkIJIGAsBiiGDV2dxK7PkkKnWy
```

For more details on the API, refer to the [admin API docs](/references/admin-api).

## Invocation execution timeout(s)

Check failure on line 180 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L180

[Google.OptionalPlurals] Don't use plurals in parentheses such as in 'timeout(s)'.
Raw output
{"message": "[Google.OptionalPlurals] Don't use plurals in parentheses such as in 'timeout(s)'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 180, "column": 25}}}, "severity": "ERROR"}

Check notice on line 180 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L180

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 180, "column": 32}}}, "severity": "INFO"}

For each retry attempt, Restate internally holds an inactivity timer to track whether the service is active and generating some work, such as setting state, invoking other services, etc. This timer can be configured with the option [`worker.invoker.inactivity_timeout`](https://docs.restate.dev/restate/configuration).

Check notice on line 182 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L182

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 182, "column": 99}}}, "severity": "INFO"}

Check notice on line 182 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L182

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 182, "column": 203}}}, "severity": "INFO"}

Check warning on line 182 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L182

[write-good.Passive] 'be configured' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be configured' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 182, "column": 203}}}, "severity": "WARNING"}

Check notice on line 182 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L182

[Google.Passive] In general, use active voice instead of passive voice ('be configured').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be configured').", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 182, "column": 203}}}, "severity": "INFO"}

Once the `inactivity_timeout` is fired, Restate tries to gracefully suspend the invocation while waiting for an event that triggers the resumption of the invocation.

Check notice on line 184 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L184

[Google.Passive] In general, use active voice instead of passive voice ('is fired').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is fired').", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 184, "column": 31}}}, "severity": "INFO"}

Check warning on line 184 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L184

[write-good.Passive] 'is fired' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'is fired' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 184, "column": 31}}}, "severity": "WARNING"}

Check notice on line 184 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L184

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 184, "column": 31}}}, "severity": "INFO"}

Check warning on line 184 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L184

[write-good.Weasel] 'gracefully' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'gracefully' is a weasel word!", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 184, "column": 58}}}, "severity": "WARNING"}
When suspending, the Restate SDK will continue executing the service code until it reaches a _suspension point_, that is a point in your service code where it's safe to interrupt the execution, for example when `await`ing on a response from another service.

Check warning on line 185 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L185

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 185, "column": 34}}}, "severity": "WARNING"}

Check notice on line 185 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L185

[Google.Contractions] Use 'that's' instead of 'that is'.
Raw output
{"message": "[Google.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 185, "column": 114}}}, "severity": "INFO"}

Check notice on line 185 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L185

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 185, "column": 119}}}, "severity": "INFO"}

Check notice on line 185 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L185

[write-good.E-Prime] Try to avoid using 'it's'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'it's'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 185, "column": 157}}}, "severity": "INFO"}

Check failure on line 185 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L185

[Vale.Spelling] Did you really mean 'ing'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'ing'?", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 185, "column": 219}}}, "severity": "ERROR"}
When suspending, Restate internally holds another timer to protect Restate from connection issues and/or misbehaving code/SDKs that prevent the tear down of the connection. This timer can be configured with the option [`worker.invoker.abort_timeout`](https://docs.restate.dev/restate/configuration).

Check warning on line 187 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L187

[write-good.Passive] 'be configured' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be configured' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 187, "column": 189}}}, "severity": "WARNING"}

Check notice on line 187 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L187

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 187, "column": 189}}}, "severity": "INFO"}

Check notice on line 187 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L187

[Google.Passive] In general, use active voice instead of passive voice ('be configured').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be configured').", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 187, "column": 189}}}, "severity": "INFO"}
Once the `abort_timeout` is fired, the user code is potentially interrupted, and all the subsequent progress is potentially lost.

Check warning on line 188 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L188

[write-good.Passive] 'is fired' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'is fired' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 188, "column": 26}}}, "severity": "WARNING"}

Check notice on line 188 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L188

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 188, "column": 26}}}, "severity": "INFO"}

Check notice on line 188 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L188

[Google.Passive] In general, use active voice instead of passive voice ('is fired').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is fired').", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 188, "column": 26}}}, "severity": "INFO"}

Check warning on line 188 in docs/services/invocation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/invocation.md#L188

[write-good.TooWordy] 'subsequent' is too wordy.
Raw output
{"message": "[write-good.TooWordy] 'subsequent' is too wordy.", "location": {"path": "docs/services/invocation.md", "range": {"start": {"line": 188, "column": 90}}}, "severity": "WARNING"}
If you have [side effects](sdk/side-effects) that take more than `inactivity_timeout + abort_timeout` to execute, you might need to tune these timeouts accordingly, for example by increasing the `inactivity_timeout` to a value larger than the expected side effect duration.

0 comments on commit e72340f

Please sign in to comment.