Start here. This is the direct spoken answer to practice first.
Why this question matters
Investigate and fix an API where client retries create duplicate orders, payments, or records. It matters in real backend work because the team needs observability, ownership, and rollback room to recover without guessing. The practical angle is idempotency, unique constraints, retry behavior, request logging, side effects, and data repair planning, tied to a concrete production decision.
I first identify what was duplicated, how many records are affected, and whether there were external side effects like payments or messages. Then I check logs, timestamps, client retry behavior, and whether the API had idempotency keys or uniqueness constraints. I would contain the issue before cleanup. Then I would plan safe data repair.