System design interview questionMedium
Stripe

Design Idempotent Request Replay

Design a processor that consolidates duplicate JSON requests and guarantees each logical request is handled once.

1. Problem Statement

Design a processor that receives JSON requests, detects duplicate logical requests, and ensures each unique request produces its side effect only once even when processing is retried.

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph LR
    A["Design Idempotent Request Replay"]
    A --> F1["Canonical request identity"]
    A --> F2["Durable idempotency records"]
    A --> F3["Concurrent duplicate handling"]
    A --> F4["Crash recovery and replay"]
    A --> F5["Retention and observability"]

3. Key Focus Areas

  • 1
    Canonical request identity
  • 2
    Durable idempotency records
  • 3
    Concurrent duplicate handling
  • 4
    Crash recovery and replay
  • 5
    Retention and observability

4. What the Interviewer Looks For

The interviewer probes these areas, and the report grades the interview against them.

  • Logical identity and canonicalization
  • Durable idempotency record and atomic claim
  • Crash recovery and exactly-once effects
  • Retention, capacity, and observability
  • Step-by-step processing logic and test cases

5. What Strong Candidates Should Demonstrate

  • Define logical request identity independently from transport retries.
  • Choose a deduplication retention policy and persistence boundary.
  • Explain exactly-once effects using idempotent state transitions.

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Continue to Dashboard

Core Concepts

IdempotencyDeduplicationRetriesCrash Recovery

Continue preparing

Build a complete software engineer mock interview plan

Related System Design

Design a Payment System

Design a reliable payment service that charges customers through external payment processors. Focus on correctness and idempotency.