← Questions
Debug performance problems in a distributed system
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Microsoft's HackerRank assessment, last asked Dec 2025. It tests performance, debugging and distributed systems.
A distributed service has regressed: latency is up, or throughput is down. Walk through, step by step, how you would find the cause and fix it.
Requirements
- Functional: a practical method that covers the first signals you check, how you narrow down where the time goes (client, network, services, storage), how you test a hypothesis safely in production, and how you stop the problem from returning.
- Non-functional: the service stays up for users while you investigate; changes are reversible.
Clarifying questions
- Is it latency, throughput, errors, or several? For all requests or some endpoints, tenants or regions?
- When did it start, and what changed then (deploys, config, traffic, dependencies)?
- What observability exists: metrics, distributed tracing, logs, profiles?
- Is it getting worse, and how many users are affected?
What a strong answer covers
- Starting with impact and timing: percentiles (p50, p99) rather than averages, the start time matched against deploys and config changes, a rollback if one lines up.
- A top-down method: the golden signals per service (latency, traffic, errors, saturation), then traces to find which hop holds the extra time.
- Common causes and how each shows up: hot partitions or keys, lock contention, retry storms and timeouts, garbage collection pauses, connection pool exhaustion, slow queries and missing indexes, noisy neighbours, network loss.
- Confirming a hypothesis: profile one instance, reproduce in staging, or test a fix with a canary or a feature flag on a small share of traffic.
- Prevention: alerts on the regressed metric, latency budgets per hop, load tests in CI, and a written post-incident review.
Follow-ups
- p50 is unchanged but p99 doubled. Where do you look first?
- Traces show the time is in a database call that is fast when run by hand. What next?
- How do you tell a capacity problem from a code regression?
Where it's asked
- Microsoft · HackerRank assessment · Last asked Dec 202590 min · Two problems in a locked full-screen browser
What it tests
performance · debugging · distributed systems
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing
