Daily iOS
Networking

Retry strategy

A payment confirmation API times out now and then. A junior engineer opened a PR that says "if it fails, send it three more times." What would you point out?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

A timeout means the server may already have processed the request, so resending a non-idempotent payment as-is can charge twice, and retrying immediately makes an outage worse. Don't retry without an idempotency key.

Share a question