Stable Request IDs Across Retry Attempts

A stable request ID can refer to one intended operation across several deliveries or attempts.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an accepted write
  2. Distinguish correlation and deduplication
  3. Trace one logical request through two network attempts
  4. Keep attempt IDs useful without changing the logical key

Trace an accepted write

A service records the intent, and the caller does not receive its response. A subsequent request using the same ID can retrieve the existing result under the protocol. Durable request identity explains one persistence design.

Distinguish correlation and deduplication

Logging one ID across attempts makes them easier to trace. Deduplication also requires an enforced state rule under concurrency. See idempotency keys.[1]

Trace one logical request through two network attempts

An export submission has request identity R17. The first attempt saves work but loses its reply. The second attempt can use R17 again so the service finds the persisted result, provided its deduplication contract supports it. See durable identities for repeated calls.

Attempt 1: R17 → store job 8
Attempt 2: R17 → find job 8
An unrelated submission needs its own request identity

Keep attempt IDs useful without changing the logical key

Logging each try can use separate attempt metadata while preserving one stable request key. Test two simultaneous tries using the same key and the same key accompanied by inconsistent inputs.

References

  1. Google, Site Reliability Engineering ↩