Durable beside Restate
A server in front of your services journals every step. The server, the determinism and the saga stay with you.
The shape: a workflow runtime. Why Durable steps this walk beat by beat; this page is the walk in prose, with the page each beat reads under Sources, and Compared is the table of every product.
What Restate gives, as its documentation describes#
A runtime in front of your services. A single binary, or the vendor's cloud, receives every request, records each handler's steps in a journal and replays it after a failure; the SDK is embedded in your services. [1][2][3][4]
A journal kept deterministic. Every database call or HTTP request is wrapped so replay is deterministic, and random values and the clock come from the context's own helpers; code inside the wrapper cannot use the context. [5][6]
Retries, then pause or kill. A failed invocation retries with exponential backoff under a retry policy set globally, per service or per handler; when the attempts run out the invocation pauses until a person resumes it, or is killed and the caller gets a terminal error, and a kill runs no compensation. [7]
The saga in your catch block. Compensations are a list you append to around each step, run in reverse in your catch block on a terminal error or a cancel, each written idempotent by you. For a one-shot payment the guide registers the refund before the call, in case the charge landed and the answer was lost. [8]
Timers and awakeables. An awakeable is a one-shot signal with a unique id that an outside system resolves or rejects once, over the HTTP API or through the SDK; a rejection lands as a terminal error in the waiting handler, and for a long wait the docs say to combine it with a durable timer as its timeout. [9]
A journal for a day. The journal of a completed invocation is kept for a retention window, a day by default, for debugging and auditing, and a shorter window saves disk; it records each operation with its result, and updates to its own keyed state beside them. [7][10]
The same work under Durable#
No server in front. The engine is a library inside your app's own functions, on the Postgres the app already has; a minute cron is the one moving part outside the request path.
A step is where the body reads the world. No journal to keep deterministic by hand: the key is a field list that never reads the clock, refused at the door otherwise, and the doctor holds every such rule over the tree before a deploy.
The undo is declared on the step. With its effect, or the reason it is irreversible; refused at the door when it says neither. When a later step fails the undos run in reverse, each a ledger row with what it found and restored.
A ledger never pruned, then limbo. Every side effect leaves a before and after image on an append-only, hash-chained ledger; durable-sdk ledger verify --file <export> verifies an export offline. A transient cause is redriven a bounded number of times, then the run waits in limbo with its rows and its undos already on the ledger.
The agent asks the graph. durable-sdk explain <workflow> prints what the door admits, every step with its undo and its writes, the facts and who listens; durable-sdk graph walk <subject> prints the closure from any node; durable-sdk graph impact --changed prints what a change reaches before it is made. Offline, over a committed index: an AI coding agent asks before it edits, never guesses.
Nothing to write but the steps. No compensation list, no determinism discipline, no proxy, no purge; durable-sdk doctor --host runs every rule offline before a deploy.
What you write yourself#
| What you write yourself | Restate | Durable |
|---|---|---|
| A runtime in front of your services | The server with its disk, or the vendor's cloud that runs it and manages the signing key, and an object store once it is a cluster. A proxy that authenticates callers in front of the ingress. The admin port kept off untrusted networks, since the server's management interfaces carry no authentication of their own, and the node-to-node port kept inside the cluster. The key each service endpoint verifies the server's signature with, when request identity is turned on. | none; the engine is a library inside your functions, no server, no proxy, no admin port |
| A journal kept deterministic | That discipline in every handler, since a reordered, added or removed operation in place is a journal mismatch on replay. Each version of the code on its own immutable endpoint, registered with the server. | a step the one place a body reads the world; the key a clock-free field list; the doctor holds it |
| Retries, then pause or kill | The policy at each level, and the hand that resumes a paused invocation. | bounded redrives of a transient cause, then limbo with the undos already run and imaged |
| The saga in your catch block | The list, the catch block that walks it backwards, and each compensation, idempotent. | the undo declared on the step, refused at the door when it says neither, run in reverse, each a ledger row |
| Timers and awakeables | The timeout on each awakeable, every time, and the catch that tells a timeout from a rejection. | waits and signals as rows; the workflow's own timeout bounds them |
| A journal for a day | The image of the row before and after every write, which the docs never describe, so it is yours to take. | the ledger: before and after images, never pruned |
When Restate wins: services in several languages behind one runtime, a keyed object per user or cart with one writer at a time, callbacks and signals into a running handler, and a team willing to run or rent the server and write its compensations by hand.
Sources#
- https://docs.restate.dev/foundations/key-concepts
- https://docs.restate.dev/server/snapshots
- https://docs.restate.dev/server/security
- https://docs.restate.dev/services/security
- https://docs.restate.dev/develop/ts/journaling-results
- https://docs.restate.dev/services/versioning
- https://docs.restate.dev/services/configuration
- https://docs.restate.dev/guides/sagas
- https://docs.restate.dev/develop/ts/external-events
- https://docs.restate.dev/concepts/durable_execution