SeniorTroubleshooting

A change passes every test in staging and fails in production. How do you approach the difference?

What they are really testing: Whether you can enumerate environment divergence systematically, and whether you treat the gap itself as the defect worth fixing rather than the individual bug.

A real interview question

A change passes every test in staging and fails in production. How do you approach the difference?

What most people say

drag me

Production is just different, so some things can only be caught there. I would fix the bug and move on.

It accepts the gap as a fact of life and guarantees recurrence. The specific bug is the cheap part; the expensive part is that staging will keep giving false confidence on this same axis forever.

The follow-ups they ask next

  • You cannot copy production data for privacy reasons. What then?

    Synthesise data with the same statistical shape: volume, distribution, cardinality and edge cases, rather than copying. Shape matters more than the actual values for finding these bugs.

  • Is shadowing production traffic safe?

    For reads generally yes. For writes it needs care: either a separate data store or a mode that discards side effects, otherwise you duplicate real actions like charging a card or sending an email.

What the interviewer is listening for

  • Enumerates divergence axes systematically
  • Names data volume and concurrency as the top two
  • Fixes the environment gap, not just the bug

What sinks the answer

  • Accepts the gap as inevitable
  • No reproduction strategy
  • Fixes only the immediate bug

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

The axes are [data, concurrency, config, scale, mocked integrations]. Data first, since [staging has 10000 rows and production 40 million, so query plans and edge cases differ]. Then [concurrency, because sequential tests never produce real races]. I reproduce with [a production-shaped data sample or load at real concurrency], then [close the gap that caused it, or I keep the false confidence].

Keep going with troubleshooting

All 87 devops engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free