InterviewHubPRO
Section Overview
Q42

Question 42 of 50

Part 4: Production Incident Management & Post-Mortems (37 - 44)

84%
Behavioral & Leadership (50 Qs)•Part 4: Production Incident Management & Post-Mortems (37 - 44)

What are the key differences between MTTR (Mean Time to Resolve) and MTTD (Mean Time to Detect), and how do you optimize both?

In Simple Words:

  • MTTD (Mean Time to Detect): How long it takes to know something is broken (optimized via automated synthetic monitoring, anomaly alerts, and SLOs).
  • MTTR (Mean Time to Resolve): How long it takes to restore customer traffic (optimized via fast rollbacks, canary deployments, feature flags, and detailed runbooks).

Optimization Techniques:

  • To Reduce MTTD: Run synthetic user journeys (e.g. Datadog Synthetics) probing signup and checkout every 60 seconds; alert on error rate spikes rather than CPU spikes.
  • To Reduce MTTR: Adopt Canary Deployments (1% -> 10% -> 100%) with automatic rollback on error spikes, and keep rollback runbooks simple.

Practical Script & Summary Template

yaml
# AWS ECS / Kubernetes Canary deployment spec with automatic rollback:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: checkout-api
spec:
  strategy:
    canary:
      steps:
        - setWeight: 5
        - pause: { duration: 10m }
      analysis:
        templates:
          - templateName: error-rate-check # Automatically rolls back if 5xx > 1%