Stateless worker / consumer

Background process that pulls messages from a queue and processes them.

Problem it solves: Decouples slow work from the user-facing request path.

Where it sits: Downstream of a queue or stream.

When to use

  • Emails, transcoding, fan-out, indexing, anything not needed in the response.

When not to use

  • Work whose result the user must see immediately.

Failure modes

  • Too few workers: backlog and consumer lag grow without bound.
  • Non-idempotent handlers duplicate effects on retry.

Metrics to watch

  • Processing rate (msg/s)
  • Consumer lag (messages, s)
  • Failure / DLQ rate

Alternatives

  • Serverless consumer
  • Stream processor

Configuration in Labs (illustrative defaults)

  • Instances (count) = 4 — Identical copies behind this logical component. Capacity scales linearly in this model.
  • Capacity per instance (req/s) = 100 — Maximum requests one instance completes per second before it saturates.
  • Base service time (ms) = 50 — Processing time per request at zero load. Queueing adds to this as utilisation rises.

In the guide

Try in Labs