Cookie Preferences
We use cookies to enhance your experience, analyse site traffic, and support our marketing. You can customise your preferences or accept all cookies. See our Privacy & Cookie Policy for details.

Systems Integration

Idempotency Is the Integration Property Everyone Assumes and Nobody Tests

Systems Integration

6 min read

Retry logic is standard practice in almost every integration built today, and it quietly assumes the operation being retried is idempotent — that running it twice has the same effect as running it once. That assumption is rarely tested explicitly, and it's usually wrong somewhere in the system the first time anyone checks carefully.

A duplicate charge, a duplicate order, or a duplicate notification is almost always this exact assumption failing silently, discovered the expensive way instead of the cheap way.

Why the assumption fails so often in practice

Idempotency has to be designed in deliberately — a unique request identifier checked against a store of already-processed requests before an operation executes — it doesn't happen automatically just because an API looks RESTful or because retries are configured with exponential backoff.

Teams that add retry logic without explicitly verifying the downstream operation handles duplicate requests safely are, in effect, adding a failure mode rather than removing one.

How to actually verify it, not just assume it

Require and document an idempotency key for every operation retries might be applied to, and explicitly test the duplicate-request path — not just the happy path — as part of the integration's test suite, the same way Stripe's widely cited idempotency key pattern is tested by any integration built against it.

Retry logic without a tested idempotency guarantee isn't resilience. It's a duplicate-request generator with good intentions.MNB Integration Practice

Key actions

  • Require an idempotency key for every operation subject to retries
  • Explicitly test the duplicate-request path, not just the happy path
  • Never assume RESTful design implies idempotent behaviour automatically
  • Audit existing retry logic for untested idempotency assumptions

Discuss this with an architect →