4 pointsby shineDaPoker6 hours ago3 comments
  • stephenr34 minutes ago
    I think the answer is probably like most things: it depends.

    - If the external service supports idempotent operations, use that option.

    - If the external service doesn't, but has a "retrieval" feature (i.e. lookup if the thing already exists, e.g fetch refunds on a given payment), use that first.

    - If the system has neither, assess how critical it is to avoid duplicates.

  • babelfish4 hours ago
    Use something like Temporal
  • moomoo115 hours ago
    You proxy those api calls yourself and have idempotency to cover you for those APIs that don’t have it. If you architect it right you won’t have more than a ms latency addition. You can avoid the race condition issues by using atomic records so if something else tries they’d see it’s in progress and exit.