Social data engineering
Async requests and signed webhooks, without duplicate work
Accept, then follow the run: idempotency keys stop duplicate collection, and stable event IDs make retries safe.
3 min read
A timeout does not mean the work failed. It means you do not know. Asynchronous acceptance plus a stable run identifier answers the question without guessing.
The pattern
Submit with an idempotency key derived from your own job ID. Receive a run identifier. Poll the run or wait for a completion event. Persist the result against the job and mark the key as done.
Handler rules for webhooks
- Verify the signature over the raw body before parsing.
- Persist processed event IDs and ignore repeats.
- Return a 2xx only after the event is stored.
Key takeaways
- Idempotency keys make retries free of duplicates.
- Verify signatures before trusting a payload.
- Keep polling as the recovery path.
Tags:asyncwebhooksreliability
Related pages
Related reading
- Why an API-first data layer beats a dashboard-first oneA dashboard serves one interface. A contract serves the product, the analyst and the agent from the same source of truth.
- The smallest social data pipeline that is still reliableFour stages: acquire with an idempotency key, validate against a schema, store with provenance, and expose a view that carries coverage.
- Matrix charts: coverage and gaps before performanceA matrix is a coverage instrument. The empty cell is the most important cell, so it must never be coloured like a measured zero.