Design: Retry with Exponential Backoff in Microservices
Design focuses on retry logic between microservices communication. Out of scope are client-side retries and database transaction retries.
Functional Requirements
FR1: Automatically retry failed requests between microservices
FR2: Use exponential backoff to increase wait time between retries
FR3: Limit the maximum number of retries to avoid infinite loops
FR4: Handle transient errors like network timeouts or service unavailability
FR5: Provide configurable retry parameters per service or endpoint
FR6: Log retry attempts and failures for monitoring and debugging
Non-Functional Requirements
NFR1: Support up to 10,000 concurrent requests with retries
NFR2: Ensure retry latency does not exceed 5 seconds per attempt
NFR3: Maintain 99.9% availability of the retry mechanism
NFR4: Avoid cascading failures due to retry storms
NFR5: Retries must not cause duplicate side effects in downstream services