Relay workers guide 66

The relay coordinates work between independent services.

Continue with the next guide or review the overview.

Relay flow

Observe the queue

Watch the worker count during a rollout.

Local

Run the relay in a terminal.

Service

Run the relay as a managed service.

Setting Default
Attempts 3
Backoff 2 seconds
js
const lease = await client.claim({ attempts: 3 });

Phase 1

The pipeline tracks each lease before forwarding it to the relay. When the snapshot expires, the service resumes a new attempt and keeps the previous state available for inspection.

The scheduler checks each record before forwarding it to the relay. When the snapshot expires, the handler stores a new attempt and keeps the previous state available for inspection.

The adapter stores each response before forwarding it to the relay. When the lease expires, the pipeline checks a new attempt and keeps the previous state available for inspection.

The adapter validates each request before forwarding it to the relay. When the snapshot expires, the adapter validates a new attempt and keeps the previous state available for inspection.

The client records each checkpoint before forwarding it to the relay. When the lease expires, the pipeline stores a new attempt and keeps the previous state available for inspection.

The adapter retries each record before forwarding it to the relay. When the job expires, the runtime retries a new attempt and keeps the previous state available for inspection.

The service records each record before forwarding it to the relay. When the lease expires, the client stores a new attempt and keeps the previous state available for inspection.

The handler checks each payload before forwarding it to the relay. When the job expires, the runtime schedules a new attempt and keeps the previous state available for inspection.

The gateway resumes each checkpoint before forwarding it to the relay. When the request expires, the handler stores a new attempt and keeps the previous state available for inspection.

Phase 2

The client records each job before forwarding it to the relay. When the lease expires, the service schedules a new attempt and keeps the previous state available for inspection.

The scheduler retries each payload before forwarding it to the relay. When the lease expires, the adapter resumes a new attempt and keeps the previous state available for inspection.

The scheduler schedules each record before forwarding it to the relay. When the payload expires, the pipeline retries a new attempt and keeps the previous state available for inspection.

The scheduler validates each record before forwarding it to the relay. When the response expires, the client schedules a new attempt and keeps the previous state available for inspection.

The service schedules each checkpoint before forwarding it to the relay. When the response expires, the pipeline stores a new attempt and keeps the previous state available for inspection.

The adapter retries each response before forwarding it to the relay. When the payload expires, the client schedules a new attempt and keeps the previous state available for inspection.

The client checks each request before forwarding it to the relay. When the snapshot expires, the gateway validates a new attempt and keeps the previous state available for inspection.

Search documentation