Design: Idempotent Request Handling System
Design focuses on server-side idempotency handling for API requests. Client-side retry logic and network error handling are out of scope.
Functional Requirements
Non-Functional Requirements
Client | | HTTP Request with Idempotency-Key header v API Gateway / Load Balancer | | Forward request v Application Server | | Check Idempotency Key Store |-- If key exists and completed: return stored response |-- If key exists and in progress: wait or reject |-- If key missing: process request | | Process business logic | | Store response and mark key as completed v Persistent Database Idempotency Key Store (Redis or DB) connected to Application Server
Pass the test and this pattern moves unknown