Durable beside Inngest
A service calls your function and memoizes each step. The idempotency key and the cleanup stay with you.
The shape: an event-function service. 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 Inngest gives, as its documentation describes#
A function called over HTTP. An event, a schedule or a webhook starts a run. The service calls your handler over HTTP or through a worker your app connects. A completed step's result is saved as a checkpoint outside your function and returned instead of running again. [1][2][3]
A step can run more than once. A failed attempt can have touched an external system before it threw, and the step is then retried. The docs ask that any effect a retry could repeat be made safe to run twice, by a key of your own, an upsert or a write that tolerates a second run. [4]
Deduplication for a window. An event id is an idempotency key for a window of hours, and a function's idempotency expression runs it once per value in that window. The event id's check is skipped by batching, debounce and a paused function, and a repeat past the window is treated as new. [5]
Retries, then a failure handler. A step is retried with backoff and jitter. Once the retries are exhausted an onFailure handler, or a function listening for the system failure event, runs the alerting or cleanup you wrote. [6]
Cancellation undoes nothing. A cancel stops the run between steps, and a step already executing finishes. A completed call is not reversed, and the cleanup is a separate function on a system event. [7]
A dashboard with a replay. The run page shows the trigger, the run's input, output and timing over a timeline of its steps, a failed step's retries with their error and timing, and a rerun from a selected step. A replay re-runs many runs of a function by time range and status after a fix, as new executions. [8]
The same work under Durable#
A library, not a service. The engine runs inside your own functions on your own Postgres: no store of the vendor's, no second store, a minute cron the one moving part outside the request path.
One run per intent, for the row's life. key: ["orderId", "requestId"], a field list off the input that never reads the clock. A second trigger with the same intent joins the one run, with no window to size.
A write reads before it writes. A provider write is an external step under a writeKey, the intent on the row before the call, so a redrive after a lost answer finds what landed instead of writing again.
The undo, then limbo instead of a handler. A step that declares neither an undo nor the reason it has none is refused at the door; when a later step fails the completed steps' undos run in reverse, each a row with what it found and restored. After bounded redrives of a transient cause the run waits in limbo with its error, its rows and the remedy, never retried in the dark.
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 idempotency key chosen by hand, no cleanup function, no window. The ledger holds the before and after image of every write, hash-chained, and durable-sdk doctor --host runs every rule offline before a deploy.
What you write yourself#
| What you write yourself | Inngest | Durable |
|---|---|---|
| A function called over HTTP | The route the service calls, with the client and the functions passed to it, a signing key set in production on the deployed app and a sync after each deploy that changes functions. For a connected worker, a long-running server that holds the outbound connection, with the signing and event keys set in production; a serverless runtime is not supported. | none; the engine is a library inside your functions, no route to sync and no signing key |
| A step can run more than once | The safe form of each side effect a retry could repeat, chosen by you for each write, payment and message. | an external step under a writeKey reads before it writes; a finished step is served from its row |
| Deduplication for a window | Which layer deduplicates, and the same guard once the window has passed. | the intent key, a field list off the input, for the row's life |
| Retries, then a failure handler | The handler, written idempotent because it runs as its own function. | bounded redrives of a transient cause, then limbo with the rows and the remedy |
| Cancellation undoes nothing | The compensation, and the review of completed side effects before any replay. | the undo declared on the step, run in reverse, each a ledger row |
| A dashboard with a replay | The record of what a write found and left. The docs say to identify which side effects completed before any rerun or replay, since either can execute them again. | the ledger: before and after images, hash-chained; a replay is a test file |
When Inngest wins: functions in several languages, a browser that must watch a run as it happens, a step that runs for hours on a worker you connect, and a managed dashboard with a query over runs and a bulk replay.
Sources#
- https://www.inngest.com/docs/durable-execution/durable-workflows
- https://www.inngest.com/docs/durable-execution/deploying-functions/serve
- https://www.inngest.com/docs/durable-execution/deploying-functions/connect
- https://www.inngest.com/docs/durable-execution/primitives/step-run
- https://www.inngest.com/docs/durable-execution/guides-and-advanced/idempotency
- https://www.inngest.com/docs/features/inngest-functions/error-retries/failure-handlers
- https://www.inngest.com/docs/features/inngest-functions/cancellation
- https://www.inngest.com/docs/platform/monitor/inspecting-function-runs