DevOps Engineer Top 100 Interview Questions
100 DevOps engineer interview questions with structured answers, comparison tables, flow diagrams, worked calculations and runnable shell scripts. Covers CI/CD, release strategies, containers, orchestration, infrastructure as code, cloud networking, observability, reliability and pipeline security, from fundamentals to production scenarios.
Questions 81-100 of 100
Q81.What is the difference between monitoring and observability?
Monitoring watches known signals and alerts when they cross thresholds. Observability is the ability to understand any internal state of a system from its outputs, including problems nobody predicted.
Monitoring Observability Answers: is something wrong? Answers: why is it wrong? Covers known failure modes Covers known and unknown failure modes Predefined metrics and checks Metrics, logs and traces with rich context Produces dashboards and alerts Supports ad hoc queries and exploration Built by choosing what to measure Built by instrumenting code to emit detailed data How they work together:
- Monitoring tells you that the checkout error rate has jumped.
- Observability lets you slice that error rate by version, region and customer type, and follow a failing request through every service to find the cause.
A system is observable when engineers can answer new questions without shipping new code to collect more data.
Q82.Compare metrics, logs and traces.
Metrics, logs and traces are the three main types of telemetry. Each answers a different kind of question, and investigations usually move from one to the next.
Metrics Logs Traces Numbers measured over time Timestamped records of events The path of one request across services Answers how much, how often, how fast Answers what exactly happened Answers where the time went and which step failed Low volume and cost High volume and cost Medium volume and cost, often sampled Best for alerts and trends Best for detailed debugging Best for latency and dependency problems Example: requests per second, error rate Example: an error message with a stack trace Example: a slow database call inside one request How they connect in an investigation:
- A metric alert shows the error rate rising.
- Traces for failing requests show which service and call is slow or failing.
- Logs from that service, linked by the trace identifier, show the exact error.
Adding a shared request or trace identifier to all three is what makes moving between them quick.
Q83.What are the four golden signals of monitoring?
The four golden signals are a small set of user-facing measurements that, together, show whether a service is healthy. If you can only monitor four things, monitor these.
Latency Traffic Errors Saturation How long requests take How much demand the service gets How many requests fail How full the service is Example: 95th percentile response time Example: requests per second Example: percentage of server errors Example: CPU, memory, queue length, connection pool use Points that matter in practice:
- Measure the latency of successful and failed requests separately, because fast errors can make average latency look better while users suffer.
- Use percentiles rather than averages for latency, since averages hide the slow tail that frustrates users.
- Saturation is the early warning: a queue that keeps growing predicts failure before errors appear.
These signals suit request-driven services; batch jobs are better measured by throughput, run duration and how long work waits before it starts.
Q84.What are SLIs, SLOs and SLAs, and how do they relate?
They form a chain from measurement to promise. An SLI measures a service's behaviour, an SLO is the internal target for that measurement, and an SLA is a contract with customers that has consequences if it is broken.
SLI (indicator) SLO (objective) SLA (agreement) A measured ratio of good events A target for the SLI over a period An external commitment with penalties Example: successful requests / all requests Example: 99.9% success over 30 days Example: 99.5% monthly, or service credits Owned by engineering Owned by engineering and product Owned by business and legal flowchart LR A["SLI: measured reliability"] -->|compared with| B["SLO: internal target"] B -->|kept stricter than| C["SLA: customer promise"] B --> D["Error budget for releases"]Key rules:
- Define SLIs from the user's point of view, such as successful and fast page loads, not server CPU.
- Set the SLO stricter than the SLA, so the team reacts before customers are owed credits.
- Do not aim for 100%: every extra nine costs much more, and users often cannot notice the difference.
Example
Defining reliability for a public search API:
- SLI for availability: the share of requests that return a non-server-error response, measured at the load balancer.
- SLI for latency: the share of requests answered within 300 milliseconds.
- SLOs: 99.9% availability and 99% of requests under 300 milliseconds, both over a rolling 30 days.
- SLA: 99.5% monthly availability, with a service credit if it is missed. The gap between 99.9% and 99.5% gives the team time to fix problems before the contract is breached.
Q85.What is an error budget, and how do you calculate it?
An error budget is the amount of unreliability an SLO allows over a period. It turns reliability into a quantity the team can spend on releases and experiments, and it gives a clear rule for when to slow down.
error_budget = 1 - SLO- SLO: the target, such as 99.9%, written as 0.999.
- Error budget: the allowed share of failures, here 0.1% of requests or of time.
- Budget remaining: the allowed failures minus the failures that have already happened in the period.
How teams use it:
- Budget left: release normally, and take reasonable risks.
- Budget nearly spent: slow down risky changes and prioritise reliability work.
- Budget exhausted: freeze feature releases, except fixes, until the window recovers.
The budget makes the trade-off between speed and stability objective: both product and engineering agree on the SLO in advance, so nobody has to argue about it during an incident.
Example
A service has a 99.9% availability SLO over 30 days and receives 10 million requests in that time.
- Error budget:
1 - 0.999 = 0.001, which is 0.1%. - Allowed failed requests:
10,000,000 * 0.001 = 10,000. - Failed requests so far this month: 6,500, so
10,000 - 6,500 = 3,500remain, or 35% of the budget. - As time, the same budget allows
30 days * 24 hours * 60 minutes * 0.001 = 43.2minutes of full outage in the month.
Q86.How much downtime does each level of availability allow?
Availability is the share of time a service works. Each extra nine cuts the allowed downtime by a factor of ten, while the cost of achieving it rises steeply.
allowed_downtime = (1 - availability) * period99% 99.9% 99.95% 3.65 days down per year 8.76 hours down per year 4.38 hours down per year 7.2 hours down per 30-day month 43.2 minutes down per 30-day month 21.6 minutes down per 30-day month 99.99% 99.999% 52.6 minutes down per year 5.26 minutes down per year 4.32 minutes down per 30-day month 25.9 seconds down per 30-day month What the numbers mean in practice:
- At 99.99%, a single slow, manual recovery uses the whole monthly budget, so detection and failover must be automatic.
- A service can never be more available than the dependencies it needs, multiplied together.
- Redundancy raises availability: two independent copies, where either is enough, fail together far less often than one.
Agree on how downtime is measured, such as from the user's side and whether partial outages count, before promising any number.
Example
An application needs three services in a chain, with availabilities of 99.9%, 99.95% and 99.99%.
- All three must work, so multiply:
0.999 * 0.9995 * 0.9999 = 0.99840, about 99.84%. - Allowed downtime per 30-day month:
(1 - 0.99840) * 43,200 minutes = 69.1minutes, more than the weakest service alone allows. - Running the 99.9% service as two independent copies, where either is enough, changes its availability to
1 - (0.001 * 0.001) = 0.999999. - The chain then reaches about
0.999999 * 0.9995 * 0.9999 = 0.99940, roughly 99.94%.
Q87.How do you design alerts that wake people up only when it matters?
Page a person only for problems that are urgent, user-facing and actionable; everything else goes to a ticket or a dashboard. Alert fatigue, where people ignore alerts because most are noise, is a real reliability risk.
- Alert on symptoms, not causes: page on high error rates or slow responses that users feel, not on high CPU that may be harmless.
- Base alerts on SLOs: alert when the error budget is being spent fast enough to matter, using burn rate, the speed of spending compared with an even pace.
- Use two windows: a fast-burn alert pages quickly for severe problems, while a slow-burn alert opens a ticket for gradual decline.
- Make every page actionable: include what is wrong, the impact, a dashboard link and a runbook.
- Review regularly: after each on-call shift, remove or tune alerts that fired without needing action.
Trade-offs:
- Fewer alerts reduce noise but risk missing early warnings, so low-urgency signals still create tickets.
- Burn-rate alerts are more precise but harder to explain than simple thresholds.
Interview tip: say that an alert nobody acts on should be deleted or downgraded, because it trains people to ignore pages.
Example
A service has a 99.9% SLO over 30 days, so its allowed error rate is 0.1%.
- The current error rate is 1.44%, so the burn rate is
1.44 / 0.1 = 14.4. - At that rate, one hour spends
14.4 * 1 hour / 720 hours = 2%of the monthly budget. - The whole budget would be gone in
720 / 14.4 = 50hours, about two days. - A common rule pages when the burn rate stays above 14.4 for an hour, and opens a ticket when it stays above about 1 for several days.
Q88.Walk through how you would respond to a production incident.
The goal during an incident is to restore service first and find the root cause later, with clear roles so effort is not duplicated.
- Acknowledge and assess: confirm the alert is real and judge severity from user impact.
- Declare and assign roles: an incident lead coordinates, one person investigates, and one handles communication.
- Communicate: post an initial status for users and stakeholders, then update at regular intervals.
- Mitigate: roll back, fail over, scale up or disable a feature to stop the impact, even before the cause is known.
- Verify recovery: confirm with metrics that users are no longer affected.
- Close and review: record the timeline and schedule a blameless review.
flowchart TD A["Alert fires"] --> B["Assess user impact"] B --> C["Declare incident and assign roles"] C --> D["Communicate status"] C --> E["Mitigate impact"] E --> F{"Service restored?"} F -->|no| E F -->|yes| G["Monitor and close"] G --> H["Blameless review"]Trade-offs:
- Rolling back fast may lose evidence, so capture logs and metrics before or while mitigating.
- Too many people in an incident slows it down; the lead should keep the response group small and focused.
Example
At 09:10, an alert shows that 20% of login attempts are failing.
- The on-call engineer confirms the problem from the dashboard and declares a high-severity incident, taking the lead role. They bring in a colleague to investigate and a support lead to post status updates.
- The investigator sees that failures started at 09:02, right after a configuration change to the session store connection settings.
- At 09:18, the lead orders the change reverted, and login errors return to normal by 09:22.
- Status updates go out at 09:15, 09:25 and 09:40. A blameless review is scheduled for the next day, with the timeline already recorded in the incident channel.
Q89.What is a blameless postmortem, and what should it contain?
A blameless postmortem is a written review after an incident that focuses on how the system and processes allowed the failure, not on who made a mistake. People share facts honestly only when they are not afraid of punishment, and honest facts are what lead to real fixes.
What it should contain:
- Summary: what happened, in two or three sentences.
- Impact: who was affected, for how long, and how badly, in numbers.
- Timeline: detection, key decisions and recovery, with timestamps.
- Root causes and contributing factors: usually several, such as a missing test, a confusing alert and a risky default.
- What went well: practices worth keeping.
- Action items: specific changes, each with an owner and a due date.
- Lessons: what the team now understands that it did not before.
What the interviewer is listening for:
- Language like "the deploy process allowed an untested config" rather than "the engineer forgot".
- Action items that change systems, such as adding a check, rather than "be more careful".
- Follow-through: action items tracked to completion.
Q90.How do you measure and reduce the time to detect and the time to restore a failure?
Mean time to detect (MTTD) is the average time from a failure starting to someone knowing about it. Mean time to restore (MTTR) is the average time from the failure starting to service being back.
MTTD = sum of detection times / number of incidentsMTTR = sum of restore times / number of incidentsHow to reduce detection time:
- Alert on user-facing symptoms with SLO-based burn-rate rules.
- Add synthetic checks that test key journeys every minute.
- Make sure alerts reach a person reliably, with escalation if unacknowledged.
How to reduce restore time:
- Keep rollback one command away and practise it.
- Write runbooks for common failures and link them from alerts.
- Use feature flags to switch off risky functionality quickly.
- Build observability so the failing component is found in minutes.
Means are easily skewed by one very long incident, so track the median too, and look at the slowest incidents individually.
Example
Four incidents in a quarter, measured from the start of each failure:
Incident 1 Incident 2 Incident 3 Incident 4 Detected after 5 minutes Detected after 12 minutes Detected after 3 minutes Detected after 20 minutes Restored after 30 minutes Restored after 50 minutes Restored after 20 minutes Restored after 60 minutes - MTTD:
(5 + 12 + 3 + 20) / 4 = 10minutes. - MTTR:
(30 + 50 + 20 + 60) / 4 = 40minutes. - Incidents 2 and 4 were found late because nobody alerted on their symptoms. Adding burn-rate alerts would have cut their detection time to under 5 minutes, and their restore times would have dropped by about the same amount.
Q91.How does distributed tracing follow a request across services?
Distributed tracing records the path of a single request through every service it touches. Each service records a span for its own work, and all spans share one trace identifier, so the full journey can be shown as a timeline.
- The first service creates a trace identifier and a root span when the request arrives.
- It passes the context on: the trace identifier and its span identifier travel in request headers to every downstream call.
- Each service records a span with start time, duration, status and useful attributes, linked to its parent span.
- Spans are sent to a collector, which assembles them into one trace.
- The trace is shown as a waterfall, revealing which call was slow or failed.
sequenceDiagram participant G as Gateway participant O as Orders service participant P as Payments service participant D as Database G->>O: Request with trace id O->>D: Query, child span D-->>O: Result O->>P: Charge, child span P-->>O: Approved O-->>G: ResponsePractical points:
- Every service must forward the trace context, or the trace breaks into pieces.
- Most systems keep only a sample of traces to limit cost, but keep all traces for errors and slow requests.
Q92.How do you collect and search logs from many servers and containers?
Send logs from every source to one central system, in a structured format with consistent fields, so they can be searched and correlated in one place instead of logging in to each server.
- Write to standard output: containers write logs to the console, and the platform captures them.
- Use structured logs: each line is a record with fields such as timestamp, level, service, version and request identifier.
- Collect with agents: a lightweight agent on each node ships logs to the central system, buffering if it is unavailable.
- Index and store: recent logs stay searchable; older logs move to cheaper storage according to a retention policy.
- Search and alert: query by field, build dashboards, and create alerts for important patterns.
Good practices:
- Include a request or trace identifier in every line, so one request can be followed across services.
- Never log secrets, passwords or full personal data; mask them at the source.
- Control volume: debug logs everywhere can cost more than the servers that produce them.
Example
A customer reports a failed order at about 14:05.
- Support finds the order's request identifier in the customer's confirmation email.
- An engineer searches the central log system for that identifier and sees lines from the gateway, the orders service and the payments service.
- The payments service logged a timeout error with the field
downstream=fraud-checkat 14:04:57. - A second query for
downstream=fraud-check AND level=errorin the last hour shows 340 similar errors. This turns one complaint into a confirmed incident within minutes.
Q93.What does "shift left" mean for security in a delivery pipeline?
Shifting security left means moving security checks earlier in the development process, towards the left of the timeline, so problems are found when they are cheapest to fix. A vulnerability caught while writing code costs minutes; the same one found in production can cost an incident.
Checks at each stage:
- While coding: editor plugins and pre-commit hooks flag secrets and risky patterns.
- On every commit: static analysis of the code, dependency vulnerability scanning and secret scanning.
- On build: container image scanning and generation of a software bill of materials.
- Before production: dynamic testing of the running application and infrastructure policy checks.
- In production: runtime monitoring, because some problems only appear with real traffic.
flowchart LR A["Code"] --> B["Commit checks"] B --> C["Build and image scan"] C --> D["Test environment scans"] D --> E["Production monitoring"] B -->|feedback in minutes| AShifting left does not mean removing later checks; it means most issues are caught early, with later stages as a safety net. Checks must be fast and low-noise, or developers start to bypass them.
Q94.How do you secure the software supply chain?
The software supply chain is everything that goes into your software: dependencies, build tools, the pipeline and the artifacts it produces. Securing it means making sure every piece comes from where you think it does and has not been tampered with.
Malicious or vulnerable dependency Unknown contents of an artifact Tampered artifact Pin versions with checksums and scan for known vulnerabilities Generate a software bill of materials for every build Sign artifacts in the pipeline and verify before deploying Compromised build system Untraceable origin Name confusion with public packages Use isolated, short-lived build runners and protected pipeline definitions Record build provenance: source commit, builder and inputs Use private package mirrors and scoped package names Practical steps:
- Review new dependencies before adding them, preferring well-maintained ones with few transitive dependencies.
- Update dependencies regularly, with automated pull requests and tests.
- Allow production to run only artifacts signed by the trusted pipeline.
The goal is a verifiable chain from a reviewed commit to the running artifact, so any step that was skipped or altered is detected.
Q95.How do you apply least privilege to pipelines and service accounts?
Least privilege means every identity, human or machine, gets only the permissions it needs, for only as long as it needs them. Pipelines and service accounts are attractive targets because they often hold powerful credentials.
- One identity per purpose: separate identities for the build pipeline, each environment's deployment and each running service.
- Narrow permissions: grant specific actions on specific resources, not administrator access.
- Short-lived credentials: issue tokens per job or per session instead of long-lived keys.
- Environment separation: pipelines triggered by unreviewed changes never receive production credentials.
- Review usage: compare granted permissions with the permissions actually used, and remove the rest.
- Audit and alert: log every use of sensitive permissions and alert on unusual activity.
Trade-offs:
- Fine-grained permissions take effort to maintain, and overly tight ones break pipelines; start broad in development and tighten using real usage data.
- Short-lived credentials need an identity trust setup between systems, but they remove the worst risk: a leaked key that works for years.
Example
A deployment pipeline uses one administrator key for every environment.
- The team creates three deployment identities: development, staging and production.
- Each identity can only update services and read secrets in its own environment, with no rights to delete networks or databases.
- The pipeline receives a token for the production identity only for jobs on the protected main branch, and the token expires after one hour.
- Three months of access logs show the staging identity never used its secret-read permission, so the team removes it. When an old administrator key is later found in an archived script, it has already been deleted and can do no harm.
Q96.How do you manage and rotate secrets in production without downtime?
Keep secrets in a dedicated store, give each service its own, and rotate them on a schedule using a sequence that keeps the old and new values valid together for a short overlap.
- Central store: all credentials live in an encrypted secret store with access control and audit logs.
- Per-service secrets: each service has its own credentials, so one leak does not expose others.
- Dynamic secrets where possible: generate short-lived database credentials on demand, so there is nothing long-lived to steal.
- Rotate with overlap: create the new secret, update consumers, then revoke the old one.
- Automate rotation: scheduled rotation makes it routine instead of a risky manual event.
- Reload without restart: services re-read secrets from mounted files or the store, or restart gradually.
Trade-offs:
- Frequent rotation limits exposure but adds moving parts; automate it before increasing the frequency.
- Dynamic secrets are the most secure but require the secret store to be highly available, since services cannot start without it.
Example
Rotating a database password used by an application with six replicas:
- The database supports two passwords for a user, so a second, new password is added while the old one still works.
- The secret store is updated with the new password. The replicas re-read the mounted secret file within a minute and open new connections with it.
- After confirming that no connections still use the old password, the team removes it from the database.
- At no point were all valid credentials missing, so no requests failed. The whole sequence runs automatically every 30 days.
Q97.A server's disk is almost full. How do you find the cause and free space safely?
Find which filesystem is full, then which directories and files are using the space, and remove or move data only after you know what it is. Deleting the wrong file can break an application or remove data you need.
- Check usage per filesystem: confirm which mount point is full; it may be a separate log or data volume.
- Find large directories: measure the size of top-level directories and drill down into the largest.
- Look for usual suspects: growing log files, core dumps, old releases, caches, temporary files and container images.
- Check for deleted files still held open: a process can keep writing to a log that was deleted, so the space is not freed until the process restarts or reopens it.
- Free space safely: compress or move old logs, clean caches with the proper command, and truncate an open log instead of deleting it.
- Prevent recurrence: add log rotation, retention rules and an alert at around 80% usage.
Trade-offs:
- Expanding the disk is a quick fix that buys time, but without rotation the same disk fills again.
- Deleting old logs frees space immediately but may remove evidence needed for an investigation; archive them first if in doubt.
Example
A script that reports filesystems above a usage threshold and the largest directories under a path. Its output depends on the machine it runs on; the output shown is from one example server:
#!/bin/sh # disk_report [THRESHOLD_PERCENT] [PATH] threshold=${1:-80} target=${2:-/var} df -P | awk -v limit="$threshold" 'NR > 1 { use = $5 sub(/%/, "", use) if (use + 0 >= limit) print "high usage:", $6, $5 }' echo "largest directories under $target (KB):" du -sk "$target"/* 2>/dev/null | sort -rn | head -n 5 # high usage: / 91% # largest directories under /var (KB): # 8123456 /var/log # 2048000 /var/lib # 512000 /var/cacheQ98.A server shows constantly high CPU usage. How do you find what is causing it?
Confirm whether the CPU is really busy and with what kind of work, find the responsible process, then find what that process is doing, and only then decide whether to fix, scale or restart.
- Check overall usage and load: separate user time, system time and time waiting for disk, since high disk wait is not a CPU problem.
- Find the top processes: list processes sorted by CPU use and note the process ID and owner.
- Look inside the process: check its threads, recent logs and whether its traffic has increased.
- Correlate with changes: a recent deployment, a scheduled job, a traffic spike or a retry storm.
- Profile if needed: take a CPU profile of the application to find the hot code path.
- Act: roll back a bad change, scale out, stop a runaway job, or fix inefficient code.
flowchart TD A["High CPU alert"] --> B{"Mostly disk wait?"} B -->|yes| C["Investigate storage instead"] B -->|no| D["Find top processes"] D --> E{"Expected process?"} E -->|no| F["Check for runaway job or compromise"] E -->|yes| G["Compare traffic and recent changes"] G --> H["Profile, then fix or scale"]An unknown process using a lot of CPU can be a sign of a compromise, such as a cryptocurrency miner, so treat it as a security event before simply stopping it.
Example
An application server sits at 95% CPU every afternoon, starting at 15:00.
- Overall usage shows mostly user time, so the work is in an application, not the kernel or disk.
- The top process is the application itself, and its traffic is normal for that time of day.
- The logs show that a report-generation job starts at 15:00 in every replica, not just one.
- A profile shows the job sorting the same large dataset repeatedly. The team moves the job to a single scheduled worker and caches the sorted data, and afternoon CPU drops to 40%.
Q99.Write a shell script that counts HTTP status codes in an access log and reports the server error rate.
Access logs record one line per request, and the status code sits in a fixed field. A short
awkprogram can count each code and compute the share of server errors, which are codes starting with 5.Approach:
- Read the log line by line and take the status code from its field; in the common log format it is the ninth space-separated field.
- Count requests per status code and in total.
- Count codes that start with 5 as server errors.
- At the end, print each code with its count, then the error count and percentage.
- Guard against an empty log, so the percentage never divides by zero.
Key points:
- Use field positions that match your log format; a custom format may place the status elsewhere.
- Sort the output, because
awkdoes not keep its arrays in any order. - For large or rotated logs, read compressed files through a decompression stream instead of extracting them first.
The same pattern answers many operational questions, such as requests per path, per client address or per minute.
Example
A script that writes a small sample log and reports on it:
#!/bin/sh log=$(mktemp) cat > "$log" <<'END' 10.0.0.1 - - [23/Oct/2026:10:00:01 +0530] "GET /jobs HTTP/1.1" 200 512 10.0.0.2 - - [23/Oct/2026:10:00:02 +0530] "GET /jobs/42 HTTP/1.1" 200 2048 10.0.0.3 - - [23/Oct/2026:10:00:02 +0530] "POST /apply HTTP/1.1" 500 128 10.0.0.1 - - [23/Oct/2026:10:00:03 +0530] "GET /missing HTTP/1.1" 404 64 10.0.0.4 - - [23/Oct/2026:10:00:04 +0530] "GET /jobs HTTP/1.1" 200 512 10.0.0.2 - - [23/Oct/2026:10:00:05 +0530] "POST /apply HTTP/1.1" 503 128 10.0.0.5 - - [23/Oct/2026:10:00:06 +0530] "GET /jobs HTTP/1.1" 200 512 10.0.0.3 - - [23/Oct/2026:10:00:07 +0530] "GET /jobs HTTP/1.1" 200 512 10.0.0.6 - - [23/Oct/2026:10:00:08 +0530] "POST /apply HTTP/1.1" 500 128 10.0.0.1 - - [23/Oct/2026:10:00:09 +0530] "GET /jobs/7 HTTP/1.1" 200 1024 END awk '{ count[$9]++ total++ if ($9 ~ /^5/) errors++ } END { if (total == 0) { print "no requests"; exit } for (code in count) printf "%s %d\n", code, count[code] printf "server errors: %d of %d (%.1f%%)\n", errors, total, 100 * errors / total }' "$log" | sort rm -f "$log" # 200 6 # 404 1 # 500 2 # 503 1 # server errors: 3 of 10 (30.0%)Q100.A deployment just went out and the error rate has tripled. What do you do in the first 15 minutes?
Treat it as an incident caused by the deployment until proven otherwise: confirm the impact, roll back quickly, and investigate once users are no longer affected.
- Minute 0 to 2, confirm: check that the error rise started with the deployment and is real, not a monitoring glitch.
- Minute 2 to 4, declare and communicate: open an incident, take or assign the lead role, and tell the team that a rollback is being considered.
- Minute 4 to 10, mitigate: roll back to the previous artifact or turn off the feature flag, and stop any further rollout.
- Minute 10 to 15, verify: confirm that error rates are back to the baseline and capture logs, traces and the diff of the release for analysis.
- Afterwards: find the root cause, add a test or a canary check that would have caught it, and roll forward with a fix.
flowchart TD A["Error rate tripled after deploy"] --> B["Confirm timing and impact"] B --> C["Declare incident and stop rollout"] C --> D{"Feature flag can isolate it?"} D -->|yes| E["Turn off flag"] D -->|no| F["Roll back to previous artifact"] E --> G["Verify error rate recovered"] F --> G G --> H["Investigate and fix forward"]Interview tip: interviewers listen for "roll back first, debug later"; trying to fix forward under pressure usually makes outages longer.
Example
At 11:00, version 7.3.0 rolls out to all replicas, and by 11:03 the error rate has risen from 0.5% to 1.6%.
- At 11:04, the on-call engineer confirms that only replicas running 7.3.0 return errors, and declares an incident.
- The release has no feature flag for the change, so at 11:06 they start a rollback to 7.2.4.
- By 11:11, all replicas run 7.2.4, and the error rate is back to 0.5% by 11:13.
- While recovering, they save the error logs, which show a new query timing out on a large table. That evening the team adds an index and a performance test, and ships 7.3.1 the next day behind a canary release.