Scrivio Interview library
LeadershipAdvanced7 min read · updated 12 November 2026

Mean time to recovery for Java services in your organisation is high because each team investigates differently and many lack diagnostics. What would you standardise?

I would standardise the things that make every investigation faster: built-in observability in the golden path (metrics, structured logs, distributed tracing and continuous JFR recording), a runbook and dashboard per service, safe tooling to capture thread and heap dumps in containers, and clear incident roles practised through training and game days. Then I would track MTTR and repeat incidents as organisational metrics, so we can see whether the changes work.

Why this question is asked

Mean time to recovery, the average time from the start of an incident until service is restored, is one of the clearest measures of how well an organisation operates. When every team investigates in its own way, half of each incident is spent working out what data exists and how to get it. Interviewers ask this to see whether a senior leader can find the common bottlenecks and fix them through a platform, not through heroics. In this answer, we will see where recovery time goes, then standardise observability, runbooks, diagnostic tooling and incident practice, and finally decide how to measure progress.

1Where Recovery Time Actually Goes

An incident has phases: detection (how long until someone notices), diagnosis (finding what is wrong), mitigation (applying a fix or rollback), and verification. When MTTR is high and teams lack diagnostics, the time is usually lost in the first two. Teams find out from customers rather than alerts, and then they cannot answer basic questions such as which dependency is slow, because their service has no latency metrics per downstream, or because the only way to get a thread dump is to ask someone with node access.

So before standardising anything, I would look at the last 20 or 30 incident timelines and measure the time in each phase. If diagnosis takes 70 percent of the time, that is where the standard should focus. The data also helps convince teams that the change is worth their effort.

Where time went in a typical incident (illustrative)
PhaseTypical todayTarget with standards
Detection20 min, often from customersUnder 5 min from alerts
Diagnosis70 min, data hard to find20 min with dashboards and dumps
Mitigation15 min10 min with tested rollback
Verification10 min5 min on the service dashboard
Most of the gain comes from detection and diagnosis.

2Observability in the Golden Path

The golden path is the set of templates, libraries and pipelines that a new service starts from. If observability is part of it, every service gets it on day one without each team designing its own. For Spring Boot services, that means Actuator with Micrometer metrics for HTTP, JVM, connection pools and HTTP clients, using the same names and tags everywhere; structured JSON logs with a trace id on every line, which Spring Boot supports out of the box since 3.4; and distributed tracing through Micrometer Tracing and OpenTelemetry, so one request can be followed across services.

I would also enable JDK Flight Recorder continuously where the overhead is acceptable, which for the default settings is usually around 1 percent. JFR keeps a rolling buffer of detailed events, such as lock contention, allocation, GC and slow I/O, so when an incident happens we can dump the last minutes instead of trying to reproduce the problem.

Text
# Standard JVM options in the base image (sizes are examples)
JAVA_TOOL_OPTIONS="-XX:StartFlightRecording=disk=true,maxage=30m,maxsize=250m,settings=default \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/diagnostics \
-Xlog:gc*:file=/diagnostics/gc.log:time,uptime:filecount=5,filesize=20m"
# During an incident: save the last 30 minutes of JFR data
jcmd 1 JFR.dump name=1 filename=/diagnostics/incident.jfr

Notice that everything writes to one known place, /diagnostics, which the platform mounts as a volume and can copy off the pod. That consistency is what lets any engineer help on any service.

3Runbooks and Dashboards per Service

Every production service gets a runbook and a standard dashboard, generated from the template and then extended by the team. The dashboard shows the same panels in the same places: request rate, error rate and latency percentiles, saturation of threads and connection pools, JVM heap after GC and GC time, and the latency of each downstream. Because it is the same layout everywhere, an engineer helping another team at 3 a.m. knows where to look.

The runbook is short and practical. It names the service's critical dependencies, its known failure modes with their symptoms, how to roll back, which feature flags can disable risky parts, and links to the dashboard and logs. I would require each runbook to be reviewed when the service has an incident, so it stays current.

4Safe Tooling for Dumps in Containers

Many teams lack diagnostics simply because their containers have no JDK tools and engineers do not have permission to exec into production pods. I would give the platform a supported, audited way to capture diagnostics: a command or button that takes thread dumps, a heap dump or a JFR dump from a chosen pod, stores the file in an access-controlled bucket, and records who did it. Heap dumps contain customer data, so the storage, access and retention rules are part of the design, not an afterthought.

With this, taking a thread dump is a one-minute action any on-call engineer can do, rather than a 30-minute search for someone with the right access.

Step throughCapturing a dump through the platform tool
On-call engineerDiagnostics toolPodSecure storage
capture thread and heap dump for orders-pod-3
jcmd Thread.print and GC.heap_dump
dump files
upload, encrypted, 14-day retention
links to files, action recorded in audit log

5 messages in order. Play them, or step through them one at a time.

No production shell access is needed, and every capture is audited.

5Incident Roles, Training and Game Days

Tools are only half the answer. I would standardise how incidents are run: a clear severity scale, defined roles such as incident commander, communications lead and investigators, one channel per incident, and a postmortem template. Then we train people in it, including a short course for new on-call engineers on reading thread dumps, heap dumps and the standard dashboards.

Game days make it real. A team deliberately injects a failure in a test or staging environment, such as a slow database, a full connection pool or a memory leak, and practises detecting and fixing it with the standard tools. The first game days usually reveal gaps, such as an alert that never fired or a runbook step that no longer works, which is exactly the point.

6Measuring Progress

Finally, I would track MTTR and the rate of repeat incidents, meaning incidents with the same root cause as an earlier one, as organisational metrics reviewed every month or quarter. MTTR shows whether we recover faster; repeat incidents show whether postmortem actions are actually done. I would look at medians and distributions rather than only the mean, because one ten-hour incident can hide real progress, and I would break MTTR down by phase, so we know whether detection or diagnosis improved. Adoption metrics help too, such as the share of services on the golden path observability and with a reviewed runbook.

7Follow-up questions

How do you get existing services onto the standard, not only new ones?

I would make adoption cheap: the observability starter and base image are drop-in upgrades, and the platform team helps the services with the most incidents first. Then I would set a target, for example all tier-one services on the standard within two quarters, and report adoption next to MTTR so leaders can see the link.

Is continuous JFR safe to run in production?

With the default settings, JFR's overhead is usually small, often quoted around 1 percent, but it depends on the workload, so we would measure it on a few services first. The profile settings collect more data and cost more, so they are better used for short recordings during an investigation.

Why track repeat incidents separately from MTTR?

Because fast recovery from the same failure every month is still a failure. Repeat incidents show whether postmortem action items get done. If the rate is high, the problem is follow-through, not tooling.

8Conclusion

In this answer, we saw that high MTTR comes mostly from slow detection and diagnosis, and that the fix is to standardise what makes investigations fast. We put metrics, structured logs, tracing and continuous JFR into the golden path, gave every service a runbook and a standard dashboard, built safe and audited tooling for thread and heap dumps in containers, and trained people in incident roles with game days. Tracking MTTR by phase and repeat incidents as organisational metrics tells us whether it is working.

What to say in the interviewAbout 80 seconds aloud

Open with

I would start by looking at recent incident timelines to see where the time goes, and I would expect most of it in detection and diagnosis. Then I would standardise four things.

Then, if they want more

First, observability in the golden path: every Spring Boot service gets Actuator and Micrometer metrics with the same names, structured logs with trace ids, distributed tracing through OpenTelemetry, GC logs, HeapDumpOnOutOfMemoryError to a known volume, and continuous JFR recording where the overhead is acceptable.

Second, a runbook and a standard dashboard per service, with the same panels everywhere, so anyone on call knows where to look, and the runbook lists dependencies, failure modes, rollback steps and feature flags.

Third, safe tooling to capture thread dumps, heap dumps and JFR dumps from containers without shell access, stored encrypted with retention rules, because heap dumps contain customer data. Fourth, a common incident process with defined roles like commander and communications lead, training for on-call engineers, and regular game days where we inject failures and practise.

To know whether it works, I would track MTTR broken down by phase, and repeat incidents, as organisational metrics reviewed every quarter, along with adoption of the standard. If repeat incidents stay high, I would focus on finishing postmortem actions rather than on more tools.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Mean time to recovery for Java services in your organisation is high because each team...": https://scrivio-interview-library.netlify.app/spring-boot/production-operations/d504457163/