Find the First Bad Config Push When the Health Check Flakes
Last updated: November 29, 2026
Quick Overview
A dispatch latency regression started somewhere in the last 100 config versions. Version 1 is known good and version 100 is known bad, but the health check sometimes fails on good versions. Find the first bad version with few checks.
Uber
November 29, 20260
0
0 solved
A dispatch latency regression started somewhere in the last 100 config versions. Version 1 is known good and version 100 is known bad, but the health check sometimes fails on good versions. Find the first bad version with few checks.
Uber pushes configuration changes constantly, and on-call engineers often have to bisect history while signals are noisy. The interviewer checks binary search with a clear invariant, and how you adapt it when the oracle is unreliable.
What the Interviewer Expects
- Use binary search with an explicit good/bad invariant
- Explain why a single flaky failure can send the search the wrong way
- Use repeated trials with majority voting and early stopping
- Count the cost in checks and trade it against confidence
- Mention verifying the result by rerunning neighbors
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- What if the check can also falsely pass on a bad version?
- How would you choose the number of attempts given a target confidence?
- What if two separate config changes each cause half the regression?
- How would you do this when each check takes 20 minutes of canary traffic?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Input: ordered versions, a check(v) returning pass or fail, with spurious failures on good versions at some rate. Output: the first version where the check is truly failing. Minimize checks....
High-Level Design
Plain bisection keeps lo good and hi bad and halves the gap with checks (7 for 100 versions). A single spurious failure on a good midpoint moves hi too far left and the ...