Skip to content
tezvyn:

How would you implement shadow deployment and which metrics justify promotion?

Source: aws.amazon.comMediumHow cards are made

How would you implement shadow deployment and which metrics justify promotion?

Tests zero-impact validation when feedback loops are broken. Mirror traffic to a shadow variant, log predictions, and compare latency, errors, and drift against SLAs. Red flag: calling it A/B testing or claiming live business metrics from unserved responses.

What's really being asked

Whether you understand how to validate a machine learning model in production without exposing users to risk, and whether you know the difference between operational metrics and downstream business metrics. Shadow deployment is specifically for situations where there is no closed-loop feedback tying a single prediction to a business outcome, so the interviewer is looking for architectural discipline and metric selection.

The full answer

Four things in order. First, the traffic mirroring mechanism: duplicate incoming requests to a shadow variant running alongside the production model, serve only the production response to the caller, and capture the shadow predictions for offline evaluation. Second, operational guardrails: monitor p99 latency, error rate, throughput, and resource utilization such as CPU, GPU, and memory to confirm the new model does not degrade infrastructure performance or starve the production variant. Third, model quality evaluation: compare prediction distributions for drift, measure accuracy or RMSE against delayed ground truth labels, and check for calibration decay. Fourth, promotion criteria: define a bake period, for example 24 to 48 hours, require zero critical alarms, and use blue-green traffic shifting to move 100 percent of traffic only after the shadow passes all thresholds.

The mistakes people make

Saying you will serve shadow traffic to a fraction of users, which is actually canary or A/B testing. Claiming you can measure live revenue, conversion, or click-through rate directly from a shadow model, which is impossible because the predictions are never served. Ignoring the cost and latency impact of running double inference on every request. Failing to explain how ground truth labels will be joined to shadow predictions later.

What usually comes next

How do you join ground truth labels to shadow predictions when feedback arrives hours or days later? At what point does shadow testing become too expensive and you should switch to A/B testing? How do you prevent the shadow variant from increasing production latency if inference is synchronous? How would you handle models with side effects or stateful behavior?

A concrete example

Using Amazon SageMaker, you configure an endpoint with two production variants. The existing model receives 100 percent of traffic and returns responses to the application. The new model is added as a shadow variant that receives mirrored requests but returns no response to the caller. Shadow outputs are logged to Amazon S3. You set CloudWatch alarms on p99 latency staying under 100 milliseconds, error rate below 0.1 percent, and GPU utilization under 80 percent. After 48 hours with no alarms and an offline evaluation showing no prediction drift, you execute a blue-green deployment to shift all traffic to the new model.

Interview question

After shadow-deploying a model for 48 hours, which evidence best supports promoting it to full production traffic?

  • a.The shadow variant showed zero critical alarms, p99 latency under SLA, and no prediction drift in offline evaluationCorrect
  • b.10% of users were served by the shadow variant with no complaints
  • c.Shadow responses produced higher click-through rates than the production model
  • d.Real-time revenue attribution shows the shadow model outperforms production
Why?

Shadow predictions are never served to users, so measuring live click-through rates is impossible. Promotion is justified only when operational SLAs are met and offline evaluation against delayed ground truth confirms model quality.

Just read this? Test yourself on what you have been reading.

Read the original → aws.amazon.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on mlops — each one lists the topics its interview covers.

See open roles