Every distributed system eventually sends the same request twice. Not because of a bug — because the first reply got lost and the client did the only sane thing: it tried again.
The two failures look identical
From the caller's side, "the server never got it" and "the server did it but the ack vanished" are the same timeout. You cannot tell them apart, so the only winning move is to make them not matter.
The fix is an idempotency key: the client picks a unique id per logical operation, the server records it, and a repeat with the same key returns the first result instead of doing the work again. INSERT ... ON CONFLICT DO NOTHING is half a distributed system in one line.
A retry you can't repeat safely isn't a retry — it's a second bug waiting for bad luck.
Where it bites
Payments, emails, queue consumers — anything with a side effect the world will notice if it happens twice. Design the dedup before the feature. Bolting it on after you've charged someone twice is a much worse afternoon than writing the key up front.