4 ms·
> (in the happy case) That caveat makes a big difference. If you're making an API call like sending an email, you really don't want it to run twice.
by loevborg 5y ago
> (in the happy case)
That caveat makes a big difference. If you're making an API call like sending an email, you really don't want it to run twice.
- williamdclt 5y agoNot sure it's the best example, having 0.01% of emails being sent twice is probably acceptable for most businesses. If it's a payment processing, it's not acceptable
- giovannibonetti 5y ago> If it's a payment processing, it's not acceptable In the payment processing company I'm working at we deal with that independently. We set some data on Redis with a TTL to signal some request has already been made in the last X minutes, and if the same request arrives again during the same period the cached response is served
- joshribakoff 5y agohopefully your email/money movement service accepts an idempotency key which solves that
- joexner 5y agoIdempotent resource cleanup tasks are the ideal use case for k8s crons.