Skip to content

Rate Limiter — Reference

Reference · Advanced · Server Connect

Define a named request-rate budget. Node.js only.

Define a named request-rate budget. Node.js only.

  • An appropriately configured Server Connect action and isolated test inputs.

Define a named request-rate budget. Node.js only.

Setting Meaning
NameThe limiter definition name selected by Consume Rate Limiter. Prefer a reusable definition. The direct runtime setup call expects options.name, so hand-authored setup JSON must not place the identifier only in the generic step name.
PointsThe point budget for a key during the duration. The inspector shows 4 by default. A Consume step can charge more than one point.
DurationThe accounting window in seconds, not milliseconds. The inspector default is 1.
Block DurationAdditional blocking duration in seconds when configured. The inspector default is 0. Test the actual limiter behavior rather than treating this as a per-request delay.

Create a test limiter with Points 2 and Duration 60. In a test action, select it in Consume Rate Limiter and consume one point per request. With a fresh key, two requests should succeed and the next should take the configured rate-limit failure path.

Consume performs the check; defining the limiter alone does not charge requests. The runtime uses Redis when its Redis client is configured, otherwise in-process memory. An in-memory budget is not automatically shared across multiple server processes or preserved through restarts. Avoid reinitializing a limiter for every request and unintentionally resetting its state.

Place the check or file operation before the work that depends on it, then verify the final HTTP response and any resulting data or file changes.

You can configure this operation and verify both its expected result and its failure boundary.