Deliver asynchronous events with cryptographic guarantees and measure every millisecond of execution.
Relay takes JSON jobs over REST, delivers them to your webhook with retries and fencing tokens, and now lets you measure internal latency with real-time Checkpoints up to the final callback.
Submit Event
Frees the HTTP thread in <5ms. Returns evt_908bce31 persisted to disk with fsync.
Execute & Checkpoints
Your worker emits stages during the job without overloading idempotency keys.
Decoupled Callback
The real business result is sent with the same event_id, signed with HMAC or Ed25519.
Webhook Checkpoints: Measure every stage without guesswork
Don't guess where execution slowed down. Your worker now emits granular checkpoints while it processes the job, with no secondary Idempotency-Keys or intermediate databases to manage.
Minimal, Direct Payload
Just send simple tags with an ISO 8601 timestamp. Example: {"tag": "db_write", "at": "..."}.
Clear, Predictable Limits
Up to 20 checkpoints per request and up to 100 accumulated checkpoints per event, accepted until 10 minutes after the final callback.
Retry-Safe & Deduplicated
Identical tags at the same timestamp are silently deduplicated, so network redeliveries add no noise.
{
"checkpoints": [
{ "tag": "db_write", "at": "2025-05-10T12:00:01.042Z" },
{ "tag": "render_asset", "at": "2025-05-10T12:00:01.110Z" }
]
}Native throttle, debounce, and batch on submit
Reuse the same Idempotency-Key with key_mode. Throttle keeps at most one open run per key. Debounce keeps the latest payload. Batch accumulates every payload into submissions and delivers them together on the webhook after the quiet period.
Throttle
key_mode: "throttle"While the event is open, repeating the key returns 202 (same event_id) or 409 if the body differs. After it closes, the same key creates a new event_id.
delay_seconds = cooldown window
Debounce
key_mode: "debounce"Each submit while the event is still idle replaces the payload and pushes deliver_at forward. When the quiet period ends, only the newest version reaches the webhook.
Latest payload wins while idle
Batch
key_mode: "batch"Each distinct submit while idle is appended to submissions; event holds the latest. The webhook receives the full list plus the newest payload.
submissions[] on the webhook
{
"event_type": "notify.user",
"event": { "user_id": "42" },
"delay_seconds": 60,
"key_mode": "throttle"
}Idempotency-Key: notify-user-42
Usage Patterns: Simple, Direct, No Fiction
See how modern teams use Relay to decouple heavy jobs, protect APIs, and keep latency instant for users.
Transactional Email
Respond 200 OK to the user in 10ms. Meanwhile Relay drives the webhook that renders the HTML template and sends it through SendGrid/SES, retrying on rate limits.
Media & File Processing
Direct upload via an S3 presigned URL. Relay only receives the asset_id and dispatches workers for resize, WebP compression, and checkpoint timing (+110ms).
Bulk Push Notifications
Absorbs spikes from promo campaigns or breaking news. Submit hundreds of thousands of jobs to Relay and drain them to APNs/FCM within your infrastructure's exact limits.
Adoption Criteria: When to use Relay vs When NOT to
No false engineering promises- ✓HTTP Backends & Microservices: Decouple async jobs without setting up a RabbitMQ cluster or hand-rolled SQS.
- ✓Webhooks with SLAs and Cryptography: Deliveries signed with Ed25519 keys and end-to-end HMAC verification.
- ✓Auditing and Latency Measurement: Record intermediate stages (Checkpoints) and get a 202 with a fixed ID.
- ✗High-Frequency Data Streaming (Kafka): Not built for ingesting IoT telemetry at millions of msgs/sec.
- ✗Storing Large Binaries: Don't send PDFs or images in the JSON body (send presigned URLs).
- ✗Pub/Sub with Thousands of Concurrent Listeners: Relay focuses on reliable point-to-point orchestration with a webhook.
4 Engineering Pillars of Relay
Transparent, modular, formalised design for systems that need consistency without accidental complexity.
At-Least-Once Delivery & Fencing
Atomic claiming with Rust workers. Each lease assigns a monotonically increasing fencing token, so GC pauses or stale workers never run events that were already re-leased.
Guarantee: Zero concurrent orphan deliveriesDual-Key Cryptography (Ed25519 & HMAC)
Strict separation of directions: API request signatures (cs_live_ or Ed25519) are verified by Relay, and outbound webhook deliveries are authenticated with HMAC sha256= and, optionally, the platform's Ed25519 key.
Guarantee: Protection against outbound credential leaksIdempotency, Throttle & Debounce
By default (once), the same Idempotency-Key with an identical payload returns the existing event; a different payload returns 409. With throttle, debounce, or batch, the key can create a new event_id after the event closes — and batch accumulates payloads into submissions.
once · throttle · debounce · batch + :rerun:<n> suffixMeasurement & Telemetry Checkpoints
Granular observability without coupling to heavy APMs. Intermediate checkpoints with stage tags and latencies shown clearly in the dashboard and exposed through Prometheus.
Prometheus /metrics and healthz endpoints ready for GrafanaTransparent Pricing in USDC on Polygon
Start free with 1,000 events every 30 days. Then a direct on-chain deposit: automatic confirmations, and early renewals stack days and events.
For trying things out and small projects. No deposit.
- 1,000 events in the period
- 20 req/s per API key
- Up to 2 schedules
- Stage checkpoints included
- A new period every 30 days
- No card, no deposit
Ideal for MVPs and microservices in early validation.
- 10,000 events in the period
- 200 req/s per API key
- Up to 100 schedules
- Stage checkpoints included
- Deduplications do not consume quota
- Exclusive Polygon deposit address
For production systems with sustained traffic.
- 70,000 events in the period
- 200 req/s per API key
- Up to 100 schedules
- Stage checkpoints included
- Deduplications do not consume quota
- Early renewal stacks events
Maximum cost efficiency for mature infrastructure.
- 150,000 events in the period
- 200 req/s per API key
- Up to 100 schedules
- Checkpoints & Prometheus telemetry
- Deduplications do not consume quota
- Early renewal stacks events