Common backend failure patterns · senior
Bad data and leaked secrets
Some incidents are about data and security, not speed. A migration can write wrong values, and a key can leak into logs. You stop the damage, repair carefully, rotate secrets and involve the right people.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Wrong data: first stop the damage with a sanity guard at checkout or pause the writes that spread it. Then find the affected rows with a check query (for example price_paise <> price * 100 updated after the migration).
- Do not restore a full backup: it throws away every order since. Restore a copy to a separate instance with point-in-time recovery and use it to compare and repair rows.
- Repair scripts are reviewed, run as a dry run first (counts and samples), work in batches inside transactions, are safe to run twice, and log every change. Check with a query that returns zero rows.
- Old code can keep writing the old way during a rollout (for example a service still updating only the old column). Mixed versions are part of the cause.
- Orders placed at wrong prices are a business and legal decision (honour, cancel with an apology, or a coupon). Bring the list and amounts to the owner.
- Leaked secret: treat it as a security incident. Tell security, keep evidence, turn off the debug logging, then rotate: create a new key, deploy it from the secret store, confirm payments work, then revoke the old key. Rotation matters more than deleting log lines.
- Check key usage in the partner logs (source IPs, endpoints, times) against your own addresses. Unknown IPs mean a possible breach: find what was returned, and involve legal.
- India: CERT-In 2022 directions require reporting many cyber incidents within 6 hours; the DPDP Rules (notified Nov 2025) add breach notices as they come into force. Security and legal decide what to report.
The red pen
Common traps: mistake → fix
Mistake: Delete the log lines and the problem is gone
Fix: the key may already be copied; rotate it.
Mistake: Restore the last backup to fix bad data
Fix: you lose the good data written since.
Mistake: A repair script that worked once in staging is safe
Fix: run a dry run on production data first.
Easy to hard
Questions interviewers ask, easy to hard
- After a data migration some prices are 100 times too low. What do you do?
- You find an API key in the logs. What are your first three steps?
- Why not restore the backup?
- How do you make a data repair script safe?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.