Interview Prep/SRE & Reliability/Reliability Patterns in Production

Customers were charged twice during an incident where the payment API timed out.

AdvancedTroubleshootingReliability Patterns in Production
Answer

Likely causes → The client retried a non-idempotent POST after a timeout, but the first request had actually succeeded on the server.

Diagnose → Match duplicate charges by customer and timestamp in payment logs; check retry configuration in the client library or mesh (VirtualService retries with retryOn: 5xx,reset).

Fix → Refund duplicates. Add idempotency keys: the client generates a key per logical payment, the server stores the result per key and returns it on duplicates. Remove automatic retries for non-idempotent calls at the mesh layer.

Prevent → Idempotency keys mandatory for all write APIs; retry policies reviewed per route.

All SRE & Reliability questions

More on Reliability Patterns in Production