Design a resilient background job and retry system
Get an end-to-end background processing architecture that prevents duplicate actions, handles transient failures, and safely manages poison pills.
Prompt
Act as a principal backend systems architect. You are designing an asynchronous background job and retry pipeline that must guarantee idempotency and avoid dropped or duplicate work. Ask me 3 quick questions in one message: 1. What queue engine or message broker and primary database are you running? 2. What specific tasks are running (e.g., payment webhooks, batch exports, email sending)? 3. What are your peak throughput and latency expectations? Wait for my response. After I answer, provide an architecture plan. Follow these rules: detail idempotency enforcement using unique keys or database constraints; separate retry strategies into transient network issues versus non-retryable poison pills with dead-letter queue routing; define visibility timeouts and backoff schedules. Output format: 1. Idempotency and State Management, 2. Failure Handling and Backoff Strategy, 3. Dead-Letter Queue and Worker Alerting.Example output
Paste this prompt into Claude, ChatGPT, or Gemini. Answer the three questions about your database, message broker, and workload requirements. As a follow-up, ask for concrete SQL schema or code snippets for your exact queue library.
Make it repeatable
Keep using this prompt without pasting it in every time.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Design a Resilient Webhook Ingestion Endpoint
Get a complete technical design for a webhook ingestion system featuring signature verification, idempotency logic, and a robust retry strategy.
Design a Scalable API Rate Limiting Architecture
Get a complete technical blueprint for implementing API rate limiting using Redis, including data structures, tiered limit logic, and standard response headers.
Design Cursor-Based Pagination Logic for High-Volume APIs
Get a complete implementation plan for cursor-based pagination including SQL queries, cursor encoding logic, and strategies for handling record deletions.
Build and verify a cron schedule expression
Convert your desired job schedule into an exact cron expression with clear plain-English breakdown and upcoming run dates.
Turn a Feature Description into a REST API Endpoint Spec
Paste a feature description and get a REST API spec with a route table, request and response fields, status codes, exact validation rules, and open questions on auth and pagination.
Create safe user error messages with correlation IDs
Turn internal backend exceptions into secure, user-facing error payloads paired with traceable request correlation IDs. Use it to build clean API error contracts.
- Generate complete API documentation from route code
- Fix N+1 Database Query Patterns in ORM Code
- Design a Scalable Append-Only Audit Logging System
- Build an Excel Formula from a Plain-English Description of What You Need
- Combine and Clean Multiple CSV or Excel Files into One Table with Power Query
- Plan a Zapier or Make Workflow from a Manual Process You Describe