Design Retry and Dead Letter Handling for Failed Background Jobs

Last updated: November 29, 2026

Quick Overview

Design how a background job system retries failed jobs and moves permanently failing ones to a dead letter queue where engineers can inspect, fix, and replay them, for example for Google Play receipt verification jobs.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
Phone Screen
System Design
Easy

0

0

0 solved


Design how a background job system retries failed jobs and moves permanently failing ones to a dead letter queue where engineers can inspect, fix, and replay them, for example for Google Play receipt verification jobs.

This is a compact reliability question that shows up early in Google loops for backend roles. The interviewer is checking that you know transient versus permanent failures, bounded retries with backoff, and a safe replay story.

What the Interviewer Expects
  • Classify errors as transient or permanent
  • Use exponential backoff with jitter and a max attempt count
  • Move exhausted jobs to a dead letter queue with failure context
  • Provide inspection and replay tooling
  • Alert on dead letter growth
Key Topics to Cover
exponential backoff
dead letter queue
poison messages
replay
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you replay 10,000 dead-lettered jobs without overloading the downstream?
  • What if a replayed job fails again?
  • How do you avoid one poison job blocking a whole partition?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Jobs come from a queue (for example Pub/Sub). Some fail due to downstream outages (transient), others due to bad data (permanent).
  • Retry transient failures automatically; stop retrying after a lim...
High-Level Design

Worker pulls a job, processes it, and acks on success. On failure it either nacks with a delay (retry) or, after max attempts, publishes the job plus metadata (error, stack, attempts, timestamps) to a...


Submit Your Answer
Markdown supported