PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Netflix

Design a concurrent latency percentile tracker

Last updated: May 18, 2026

Quick Overview

This question evaluates understanding of concurrent data structures, thread-safety, time-windowed metrics aggregation, and percentile computation for latency tracking within the Software Engineering Fundamentals domain.

  • hard
  • Netflix
  • Software Engineering Fundamentals
  • Software Engineer

Design a concurrent latency percentile tracker

Company: Netflix

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Technical Screen

Design a **thread-safe** `LatencyTracker` class that supports: 1. **Recording samples** - Input: `timestamp` (e.g., epoch millis) and `latencyMs` (integer milliseconds) - Operation: `addSample(timestamp, latencyMs)` 2. **Querying percentile latency over a time window** - Input: a time window and a percentile - Window can be specified as `[startTimestamp, endTimestamp]` (inclusive) - Percentile `p` is in `(0, 100]` (e.g., 50, 90, 95, 99) - Operation: `getPercentile(startTimestamp, endTimestamp, p)` - Output: the latency value (ms) at percentile `p` among samples whose timestamps fall inside the window. Additional requirements: - The class must support **concurrent** writers (`addSample`) and readers (`getPercentile`). - Clarify any assumptions you need (e.g., maximum query window/retention, acceptable approximation, out-of-order timestamps).

Quick Answer: This question evaluates understanding of concurrent data structures, thread-safety, time-windowed metrics aggregation, and percentile computation for latency tracking within the Software Engineering Fundamentals domain.

Related Interview Questions

  • Model Direct-Sold DSP Orders - Netflix
  • Design demand-side ads relational tables - Netflix (hard)
  • Explain concurrency and reliability tradeoffs - Netflix (hard)
  • Design a thread-safe key-value store - Netflix (medium)
|Home/Software Engineering Fundamentals/Netflix

Design a concurrent latency percentile tracker

Netflix logo
Netflix
Feb 12, 2026, 12:00 AM
hardSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
22
0
Loading...

Design a thread-safe LatencyTracker class that supports:

  1. Recording samples
    • Input: timestamp (e.g., epoch millis) and latencyMs (integer milliseconds)
    • Operation: addSample(timestamp, latencyMs)
  2. Querying percentile latency over a time window
    • Input: a time window and a percentile
      • Window can be specified as [startTimestamp, endTimestamp] (inclusive)
      • Percentile p is in (0, 100] (e.g., 50, 90, 95, 99)
    • Operation: getPercentile(startTimestamp, endTimestamp, p)
    • Output: the latency value (ms) at percentile p among samples whose timestamps fall inside the window.

Additional requirements:

  • The class must support concurrent writers ( addSample ) and readers ( getPercentile ).
  • Clarify any assumptions you need (e.g., maximum query window/retention, acceptable approximation, out-of-order timestamps).
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Netflix•More Software Engineer•Netflix Software Engineer•Netflix Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.