You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/architecture.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ If you only remember one thing: **a function run flows event → schedule → qu
16
16
4. The **executor** pulls from the queue and invokes your function — either over HTTP (**serve**) or over a persistent worker connection (**Connect**).
17
17
5. The result of each step is written to the **state store**, and the next step is enqueued. This repeats until the function completes.
18
18
19
-
Steps that wait — `step.waitForEvent`, `step.invoke`, `step.sleep`, and `cancelOn` — leave a **pause** in the state store instead of an immediate queue item. The pause is resumed by an incoming event, a signal, or a timer.
19
+
Steps that wait — [`step.waitForEvent`](/docs/features/inngest-functions/steps-workflows/wait-for-event), [`step.invoke`](/docs/guides/invoking-functions-directly), `step.sleep`, and `cancelOn` — leave a **pause** in the state store instead of an immediate queue item. The pause is resumed by an incoming event, a signal, or a timer.
20
20
21
21
## Subsystems
22
22
@@ -31,7 +31,7 @@ The Event API is intentionally one of the smallest subsystems we run, because av
31
31
The scheduler consumes from the event stream and decides which functions to invoke. For every event, it:
32
32
33
33
- Matches the event name against function triggers (including wildcards and CEL expressions).
34
-
- Resumes any **pauses** that are waiting for this event (`step.waitForEvent`, `cancelOn`, `step.invoke` replies).
34
+
- Resumes any **pauses** that are waiting for this event ([`step.waitForEvent`](/docs/features/inngest-functions/steps-workflows/wait-for-event), `cancelOn`, [`step.invoke`](/docs/guides/invoking-functions-directly) replies).
35
35
- Evaluates [batching](/docs/guides/batching), [debounce](/docs/guides/debounce), and [rate limits](/docs/guides/rate-limiting) to decide whether (and when) to create a run.
36
36
- Creates new function runs and enqueues their first step.
37
37
@@ -70,8 +70,8 @@ The Connect Gateway is its own subsystem. If Connect is degraded, serve-based fu
70
70
71
71
A pause is a row in the state store that says "resume this run when X happens". Three things create pauses:
72
72
73
-
-`step.waitForEvent` and `step.waitForSignal` — resume on a matching event or signal.
74
-
-`step.invoke` — resume on the completion of another function run.
73
+
-[`step.waitForEvent`](/docs/features/inngest-functions/steps-workflows/wait-for-event) and [`step.waitForSignal`](/docs/features/inngest-functions/steps-workflows/wait-for-signal) — resume on a matching event or signal.
74
+
-[`step.invoke`](/docs/guides/invoking-functions-directly) — resume on the completion of another function run.
75
75
-[`cancelOn`](/docs/features/inngest-functions/cancellation/cancel-on-events) — cancel the run if a matching event arrives.
76
76
77
77
All three share the same pause-matching infrastructure, and all three depend on the global **event stream**: every inbound event is checked against outstanding pauses before it can wake a run. That means `waitForEvent`, `cancelOn`, and `invoke` latency track the health of the scheduler and event stream, not the queue.
@@ -98,7 +98,7 @@ Flow control features are not all enforced in the same place. Where a feature ru
98
98
|[Throttling](/docs/guides/throttling)| Function Execution | Enforced by the executor at lease time. |
99
99
|[Priority](/docs/guides/priority)| Function Execution | Decides which queue item the executor leases next. |
100
100
|[Singleton](/docs/guides/singleton)| Function Execution | Enforced by the executor; prevents concurrent runs of the same key. |
101
-
|`step.waitForEvent`, `step.invoke`, `cancelOn`| Pauses + Event Stream | Share pause-matching; depend on the global event stream. |
101
+
|[`step.waitForEvent`](/docs/features/inngest-functions/steps-workflows/wait-for-event), [`step.invoke`](/docs/guides/invoking-functions-directly), `cancelOn`| Pauses + Event Stream | Share pause-matching; depend on the global event stream. |
102
102
103
103
A useful rule of thumb: **features that decide whether a run happens at all run in Scheduling; features that decide when an existing run runs next run in the Executor.**
104
104
@@ -109,7 +109,7 @@ When something looks wrong, the subsystem usually narrows itself down quickly:
109
109
-`inngest.send()` is failing or slow → **Event API**.
110
110
- Events are accepted but functions never start → **Scheduler** or **Queue**.
111
111
- Runs start but get stuck mid-flight → **Executor**, your **serve endpoint**, or **Connect Gateway**.
112
-
-`step.waitForEvent` or `cancelOn` is not firing → **Scheduler** or **State store** (pauses).
112
+
-[`step.waitForEvent`](/docs/features/inngest-functions/steps-workflows/wait-for-event) or `cancelOn` is not firing → **Scheduler** or **State store** (pauses).
113
113
- Dashboards and the REST API are slow but runs are fine → **REST API**, not the runtime.
114
114
115
115
Each subsystem is reported on independently in our [status page](https://status.inngest.com), so the failure mode you observe should map directly to one of the subsystems above.
0 commit comments