Classic distributed-systems problem, social media edition:
- script sends “create post”
- server creates it, response is slow
- client times out, retries
- two identical posts on the brand account
The GPTpost API accepts an Idempotency-Key header on create calls: a retry with the same key returns the original post.
What we have settled on:
- key = logical identity of the post (slot + account), never a timestamp
- same key for every retry of that post
- a local state file so re-runs skip completed work
- on 429, wait for Retry-After, retry with the same key
Docs: https://oraglegpt.org/use-cases/social-media-api/
How do you derive idempotency keys in your own systems? Hash of the payload, or a business identifier?
You must log in or register to comment.
