
Inngest Flow Control
Configure Inngest concurrency, throttling, debouncing, batching, and priority so background jobs do not overwhelm your stack.
Install
npx skills add https://github.com/inngest/inngest-skills --skill inngest-flow-controlWhat is this skill?
- Quick decision guide maps intent to concurrency, throttle, rate limit, debounce, singleton, batching, or priority
- Explains that concurrency limits active step execution, not runs waiting on sleep or waitForEvent
- Covers throttling, rate limiting, debounce, singleton, event batching, and priority tiers
- TypeScript-first examples with pointers to official docs for Python and Go
- Prescriptive guidance on when each mechanism prevents overload versus fairness issues
Adoption & trust: 614 installs on skills.sh; 23 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Entra App Registrationmicrosoft/azure-skills
Azure Aigatewaymicrosoft/azure-skills
Lark Openapi Explorerlarksuite/cli
Supabasesupabase/agent-skills
Firebase Auth Basicsfirebase/agent-skills
Firebase Data Connectfirebase/agent-skills
Journey fit
Common Questions / FAQ
Is Inngest Flow Control safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Inngest Flow Control
# Inngest Flow Control Master Inngest flow control mechanisms to manage resources, prevent overloading systems, and ensure application reliability. This skill covers all flow control options with prescriptive guidance on when and how to use each. > **These skills are focused on TypeScript.** For Python or Go, refer to the [Inngest documentation](https://www.inngest.com/llms.txt) for language-specific guidance. Core concepts apply across all languages. ## Quick Decision Guide - **"Limit how many run at once"** → Concurrency - **"Spread runs over time"** → Throttling - **"Block after N runs in a period"** → Rate Limiting - **"Wait for activity to stop, then run once"** → Debounce - **"Only one run at a time for this key"** → Singleton - **"Process events in groups"** → Batching - **"Some runs are more important"** → Priority ## Concurrency **When to use:** Limit the number of executing steps (not function runs) to manage computing resources and prevent system overwhelm. **Key insight:** Concurrency limits active code execution, not function runs. A function waiting on `step.sleep()` or `step.waitForEvent()` doesn't count against the limit. ### Basic Concurrency ```typescript inngest.createFunction( { id: "process-images", concurrency: 5, triggers: [{ event: "media/image.uploaded" }] }, async ({ event, step }) => { // Only 5 steps can execute simultaneously await step.run("resize", () => resizeImage(event.data.imageUrl)); } ); ``` ### Concurrency with Keys (Multi-tenant) Use `key` parameter to apply limit per unique value of the key. ```typescript inngest.createFunction( { id: "user-sync", concurrency: [ { key: "event.data.user_id", limit: 1 } ], triggers: [{ event: "user/profile.updated" }] }, async ({ event, step }) => { // Only 1 step per user can execute at once // Prevents race conditions in user-specific operations } ); ``` ### Account-level Shared Limits ```typescript inngest.createFunction( { id: "ai-summary", concurrency: [ { scope: "account", key: `"openai"`, limit: 60 } ], triggers: [{ event: "ai/summary.requested" }] }, async ({ event, step }) => { // Share 60 concurrent OpenAI calls across all functions } ); ``` **When to use each:** - Basic: Protect databases or limit general capacity - Keyed: Multi-tenant fairness, prevent "noisy neighbor" issues - Account-level: Share quotas across multiple functions (API limits) ## Throttling **When to use:** Control the rate of function starts over time to work around API rate limits or smooth traffic spikes. **Key difference from concurrency:** Throttling limits function run starts; concurrency limits step execution. ```typescript inngest.createFunction( { id: "sync-crm-data", throttle: { limit: 10, // 10 function starts period: "60s", // per minute burst: 5, // plus 5 immediate bursts key: "event.data.customer_id" // per customer }, triggers: [{ event: "crm/contact.updated" }] }, async ({ event, step }) => { // Respects CRM API rate limits: 10 calls/min per customer await step.run("sync", () => crmApi.updateContact(event.data)); } ); ``` **Configuration:** - `limit`: Functions that can start per period - `period`: Time window (1s to 7d) - `burst`: Extra immediate starts allowed - `key`: Apply limits per unique key value ## Rate Limiting **When to use:** Hard limit to prevent abuse or skip excessive duplicate events. **Key difference from throttling:** Rate limiting discards events; throttling delays them. ```typescript inngest.createFunction( { id: "webhook-processor", rateLimit: { limit: 1, period: "4h", key: "ev