Resilient API Ingestion Pipeline with Retry and Backoff
For data engineers and DevOps teams who need to pull data from an API that times out, returns 5xx errors or hits rate limits, and who don't want to lose or duplicate records.
The prompt makes the model propose the simplest solution that works, compare alternatives, list risks with a response plan, and deliver sample code with retry, exponential backoff with jitter, rate limit handling, pagination and idempotency. It also states what was left out of scope and which assumptions were made.
Fill in the bracketed fields with your API, your stack and your constraints, paste the documentation or a sample response, and use the result as a starting point for review and testing before going to production.
You are a senior Data Engineer with experience ingesting data from unreliable external APIs. ## Context - Source API: [API: name, REST/GraphQL type, authentication, pagination, request limits] - Destination: [DESTINATION: e.g., S3, BigQuery, Postgres] - Orchestration and language: [STACK: e.g., Airflow + Python] - Volume and frequency: [VOLUME_AND_FREQUENCY] ## Goal Design and implement an ingestion that survives API failures, with retry and backoff, without losing or duplicating data.