System Design, Redis & Distributed Systems
5-8 Years (Senior)
Medium
Production Scenario
How do you implement Async Worker Retries with Exponential Backoff and Dead Letter Queues (DLQ)?
Real-World Scenario / Incident Description
A bank webhook was temporarily offline; retrying failed webhook jobs every 1 second overwhelmed the receiving server and wasted CPU cycles.
553 views
•
Updated 1 month ago
Exponential Backoff with Jitter
$retryDelay = min(3600, pow(2, $attemptCount) * 10 + rand(0, 5));
- Attempt 1: 20s
- Attempt 2: 40s
- Attempt 3: 80s
- Max Retries Exceeded: Route the failed payload to a Dead Letter Queue (DLQ) for automated alerting and manual developer replay.
Related Concepts:
#Dead Letter Queue
#Exponential Backoff
#Queues
#Resilience
More System Design, Redis & Distributed Systems Interview Questions
How does the Redis Redlock Algorithm provide Fault-Tolerant Distributed Locking across independent Redis nodes?
Read →
Explain the 3 High-Scale Cache Failure Patterns: Cache Avalanche, Cache Breakdown (Dog-Piling), and Cache Penetration, with mitigations.
Read →
Compare Rate Limiting Algorithms: Token Bucket, Leaky Bucket, Fixed Window Counter, and Sliding Window Log/Counter.
Read →
How do you design a Real-Time Notification System delivering to 10M concurrent users with WebSockets and Redis Pub/Sub?
Read →
How do you design an Idempotent Payment Processing Architecture with the Saga Pattern across Microservices?
Read →