<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq" -->

---
title: Next.js Serverless Functions vs Durable Functions
description: Building long-running or scheduled workflows in Next.js using plain Serverless Functions requires manual queue and state management and is prone to timeouts....
canonical: https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Next.js Serverless Functions vs Durable Functions | daily.dev
og:description: Building long-running or scheduled workflows in Next.js using plain Serverless Functions requires manual queue and state management and is prone to timeouts....
og:url: https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq
og:image: https://api.daily.dev/og/posts/tcAuP2SiQ.png
og:image:alt: Next.js Serverless Functions vs Durable Functions
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.

# Next.js Serverless Functions vs Durable Functions

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

## Summary

Building long-running or scheduled workflows in Next.js using plain Serverless Functions requires manual queue and state management and is prone to timeouts. Durable Functions, exemplified by Inngest, solve this by breaking workflows into retriable, resumable steps triggered by events rather than HTTP requests, removing custom database state, enabling waits from hours to months, and adding flow control features like throttling and rate limiting. A worked example refactors a domain verification CRON job (inspired by Resend) into a Durable Function, showing the code simplification and reliability gains, including a throttle config limiting the function to 2 calls per second to respect a third-party API rate limit.

## Full article

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

## Questions this post answers

### How do I avoid timeouts when running long domain verification or polling workflows in Next.js serverless functions?

Replace the CRON-triggered serverless loop with a Durable Function that processes one item per run and uses steps for waits and retries. Each step gets its own execution window equivalent to a regular serverless function, so a workflow can span hours or months without hitting the platform's per-invocation timeout, since only the active step executes at a time.

_Developers architecting long-running Next.js workflows can find durable-function patterns like this through daily.dev._

### How can I rate limit an Inngest Durable Function to avoid exceeding a third-party API's request limit?

Add a throttle configuration object to inngest.createFunction with a limit and period, for example limit 2 and period '1s' to cap execution at two calls per second. This prevents the workflow from overwhelming external APIs like Resend's email API, which enforces a 2 requests per second rate limit, without adding custom rate-limiting logic in the function code.

_Teams tuning API rate limits and throttling in production workflows can track patterns like this via daily.dev._

## Similar posts on daily.dev

- [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
- [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
- [Why raising your serverless timeout won't save long jobs](https://daily.dev/posts/why-raising-your-serverless-timeout-won-t-save-long-jobs-qdgq0mach) · Inngest Blog · 0 upvotes · 0 comments
- [Drain Payload’s Schedule Queue on Serverless, End to End](https://daily.dev/posts/drain-payload-s-schedule-queue-on-serverless-end-to-end-fvn0xqsmt) · Medium · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq)

```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":"Next.js Serverless Functions vs Durable Functions","url":"https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq"},"datePublished":"2026-09-13T19:57:16.329Z","dateModified":"2026-10-15T02:22:32.395Z","description":"Building long-running or scheduled workflows in Next.js using plain Serverless Functions requires manual queue and state management and is prone to timeouts....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9d7f97c361853e16e50653a372ea7271?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9d7f97c361853e16e50653a372ea7271?_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/next-js-serverless-functions-vs-durable-functions-tcaup2siq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"inngest,nextjs,serverless,workflow-orchestration","timeRequired":"PT9M"}
{"@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":"Next.js Serverless Functions vs Durable Functions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/next-js-serverless-functions-vs-durable-functions-tcaup2siq#faq","mainEntity":[{"@type":"Question","name":"How do I avoid timeouts when running long domain verification or polling workflows in Next.js serverless functions?","acceptedAnswer":{"@type":"Answer","text":"Replace the CRON-triggered serverless loop with a Durable Function that processes one item per run and uses steps for waits and retries. Each step gets its own execution window equivalent to a regular serverless function, so a workflow can span hours or months without hitting the platform's per-invocation timeout, since only the active step executes at a time. Developers architecting long-running Next.js workflows can find durable-function patterns like this through daily.dev."}},{"@type":"Question","name":"How can I rate limit an Inngest Durable Function to avoid exceeding a third-party API's request limit?","acceptedAnswer":{"@type":"Answer","text":"Add a throttle configuration object to inngest.createFunction with a limit and period, for example limit 2 and period '1s' to cap execution at two calls per second. This prevents the workflow from overwhelming external APIs like Resend's email API, which enforces a 2 requests per second rate limit, without adding custom rate-limiting logic in the function code. Teams tuning API rate limits and throttling in production workflows can track patterns like this via daily.dev."}}]}
```

