<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq" -->

---
title: What are Durable Functions? A visual JavaScript primer
description: Durable Functions provide a framework for building resilient, stateful workflows that survive failures, retries, and pauses, contrasted against traditional...
canonical: https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What are Durable Functions? A visual JavaScript primer | daily.dev
og:description: Durable Functions provide a framework for building resilient, stateful workflows that survive failures, retries, and pauses, contrasted against traditional...
og:url: https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq
og:image: https://api.daily.dev/og/posts/E1hwaWHhQ.png
og:image:alt: What are Durable Functions? A visual JavaScript primer
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What are Durable Functions? A visual JavaScript primer

**[Inngest Blog](https://daily.dev/sources/inngest)** · 10 min read · 0 upvotes · 0 comments

## Summary

Durable Functions provide a framework for building resilient, stateful workflows that survive failures, retries, and pauses, contrasted against traditional background and Cron jobs which lack state management, robust error handling, and scalability. Using Inngest's JavaScript SDK, workflows are broken into modular steps (via step.run, step.waitForEvent, and the newer step.fetch) that are individually retried and memoized, with an underlying Durable Execution Engine coordinating state between the SDK and the platform over HTTP. The piece walks through a step-by-step illustration of how a job queue, retries (default 4, starting with a 15-second delay), and state memoization work under the hood, and introduces step.fetch() for offloading durable HTTP requests to third-party APIs without consuming function execution time.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/durable-functions-a-visual-javascript-primer>

## Questions this post answers

### What is a Durable Function and how does it differ from a regular background job?

A Durable Function is a workflow that maintains state and logic through failures, retries, and pauses, guaranteeing start-to-finish execution once started. Unlike traditional background or Cron jobs, which lose state on failure and must restart from scratch, Durable Functions break work into modular steps that are individually memoized, retried, and resumed without redoing completed work.

_daily.dev surfaces workflow-reliability patterns like durable functions for engineers designing resilient backend systems._

### How does Inngest's step.waitForEvent function work in a durable workflow?

step.waitForEvent pauses a workflow step until a matching event arrives or a timeout elapses, for example waiting up to 7 days for a shipment-created event matching an order ID. Unlike polling with Cron jobs, this wait does not consume compute resources while paused, making it efficient for handling long, time-sensitive delays such as third-party confirmations.

_developers weighing event-driven waits versus polling can track patterns like this on daily.dev._

### What does Inngest's step.fetch() function do and what are its benefits?

step.fetch() lets a Durable Function make HTTP requests to third-party APIs by offloading the request execution to Inngest's infrastructure instead of the serverless runtime. Benefits include automatic retries on network failures, no impact on the function's execution time limits, and full observability of HTTP requests in the dashboard, with the function resuming once the response returns.

_daily.dev helps developers evaluating durable HTTP request tooling stay current on new SDK capabilities._

## Similar posts on daily.dev

- [Weighing the benefits of AWS Lambda’s durable functions](https://daily.dev/posts/weighing-the-benefits-of-aws-lambda-s-durable-functions-qmmbps0ur) · InfoWorld · 0 upvotes · 0 comments
- [Hatchet](https://daily.dev/posts/hatchet-alugo3xs3) · Hacker News · 2 upvotes · 0 comments
- [Durable AI Workflows 2026: Inngest, Trigger.dev, Vercel Workflow](https://daily.dev/posts/durable-ai-workflows-2026-inngest-trigger-dev-vercel-workflow-un2tgyyqs) · Alex CloudStar · 0 upvotes · 0 comments
- [A new programming model for durable execution](https://daily.dev/posts/a-new-programming-model-for-durable-execution-8hk6zrkca) · Vercel · 0 upvotes · 0 comments
- [All your workflows are about to be long running. Build for it.](https://daily.dev/posts/all-your-workflows-are-about-to-be-long-running-build-for-it--ff8epi154) · Inngest Blog · 0 upvotes · 0 comments

---

Tags: [#inngest](https://daily.dev/tags/inngest), [#javascript](https://daily.dev/tags/javascript), [#workflow-orchestration](https://daily.dev/tags/workflow-orchestration)

[View this post on daily.dev](https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What are Durable Functions? A visual JavaScript primer","url":"https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq"},"datePublished":"2026-09-13T19:57:17.923Z","dateModified":"2026-10-15T02:22:41.865Z","description":"Durable Functions provide a framework for building resilient, stateful workflows that survive failures, retries, and pauses, contrasted against traditional...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b58bc73d20bbea34134c34d64c1f36c4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b58bc73d20bbea34134c34d64c1f36c4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"inngest,javascript,workflow-orchestration","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"What are Durable Functions? A visual JavaScript primer"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/what-are-durable-functions-a-visual-javascript-primer-e1hwawhhq#faq","mainEntity":[{"@type":"Question","name":"What is a Durable Function and how does it differ from a regular background job?","acceptedAnswer":{"@type":"Answer","text":"A Durable Function is a workflow that maintains state and logic through failures, retries, and pauses, guaranteeing start-to-finish execution once started. Unlike traditional background or Cron jobs, which lose state on failure and must restart from scratch, Durable Functions break work into modular steps that are individually memoized, retried, and resumed without redoing completed work. daily.dev surfaces workflow-reliability patterns like durable functions for engineers designing resilient backend systems."}},{"@type":"Question","name":"How does Inngest's step.waitForEvent function work in a durable workflow?","acceptedAnswer":{"@type":"Answer","text":"step.waitForEvent pauses a workflow step until a matching event arrives or a timeout elapses, for example waiting up to 7 days for a shipment-created event matching an order ID. Unlike polling with Cron jobs, this wait does not consume compute resources while paused, making it efficient for handling long, time-sensitive delays such as third-party confirmations. developers weighing event-driven waits versus polling can track patterns like this on daily.dev."}},{"@type":"Question","name":"What does Inngest's step.fetch() function do and what are its benefits?","acceptedAnswer":{"@type":"Answer","text":"step.fetch() lets a Durable Function make HTTP requests to third-party APIs by offloading the request execution to Inngest's infrastructure instead of the serverless runtime. Benefits include automatic retries on network failures, no impact on the function's execution time limits, and full observability of HTTP requests in the dashboard, with the function resuming once the response returns. daily.dev helps developers evaluating durable HTTP request tooling stay current on new SDK capabilities."}}]}
```

