Best practices
Reliability practices
Design handlers and stream policies that remain safe under retries, partial failures, and traffic spikes.
Make handlers idempotent
Use the Arc event ID as the idempotency key for every external write. Store completion with the business record when possible.
Bound retry work
- Set a finite attempt count.
- Use exponential backoff with a maximum delay.
- Quarantine permanent failures.
- Alert on quarantine growth, not individual retries.
Control load
Scale workers from delivery lag and lease pressure. Avoid scaling from producer request volume alone because routing fan-out changes downstream work.