← LinkedIn Interview Insights

LinkedIn·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

LinkedIn ML Engineer system design round, focused entirely on building a metrics monitoring platform from scratch. The scope was broader than I expected and I felt like I was playing catch-up the whole time.

Questions Asked (6)

Q1

Design a metrics monitoring system for large-scale services. Walk through the full end-to-end architecture.

System DesignTechnical Trade-offs
Author's notes

I started with the ingestion layer and worked forward, which in hindsight was the wrong order.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of services, metrics volume, retention, query latency). Then outline a high-level architecture covering collection, ingestion, storage, querying, and alerting, and dive into trade-offs for each component, especially for ML-specific needs like model performance monitoring.

Pro tip: Emphasize how the system supports ML-specific metrics (e.g., model drift, prediction latency) and how you'd handle high-cardinality dimensions without exploding costs—this shows you understand both systems and ML production challenges.

1. Clarify Requirements and Scale

Ask about the number of services, metrics per second, retention period, query patterns, and latency requirements. Also clarify if ML model metrics (e.g., accuracy, drift) need special handling.

2. High-Level Architecture

Sketch the end-to-end flow: metric sources (services, ML models) -> collection agents -> ingestion pipeline -> storage -> query/visualization -> alerting. Mention key components like Kafka, time-series databases, and query engines.

3. Deep Dive into Components

For each component, discuss design choices and trade-offs: pull vs push collection, stream processing for aggregation, storage options (e.g., TSDB vs data lake), and query optimization (e.g., downsampling, indexing).

4. Scalability and Reliability

Explain how the system scales horizontally (e.g., sharding, partitioning) and ensures reliability (replication, fault tolerance, backpressure). Address how to handle spikes and avoid data loss.

5. ML-Specific Considerations and Monitoring

Highlight how ML metrics are integrated: monitoring model performance, data drift, and prediction latency. Discuss alerting on anomalies and integration with ML pipelines for retraining triggers.

Key Points to Mention

  • Time-series database selection (e.g., Prometheus, InfluxDB, TimescaleDB) and trade-offs (scalability, query flexibility, cost).
  • Data collection: push vs pull models, agent-based vs agentless, and handling high-cardinality labels.
  • Stream processing for real-time aggregation and anomaly detection (e.g., Kafka Streams, Flink).
  • Storage tiering and retention policies: hot vs cold storage, downsampling, and compression.
  • Query and visualization layer: PromQL, Grafana, and optimizing for low-latency queries.
  • Alerting and anomaly detection: threshold-based vs ML-based, and integration with incident management.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Compare push vs pull models for metrics collection. When would you choose one over the other, and what are the tradeoffs around reliability, backpressure, service discovery, and failure isolation?

System DesignTechnical Trade-offs
Author's notes

This is where I actually felt okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining push and pull models and their typical implementations in ML infrastructure. Then systematically compare them across the four dimensions: reliability, backpressure, service discovery, and failure isolation, using concrete examples. Finally, discuss when to choose each model based on system requirements and constraints.

Pro tip: Emphasize that the choice often depends on the specific use case and existing infrastructure; a hybrid approach can leverage the strengths of both. Also, relate the discussion to ML-specific metrics like model performance and data drift, showing you understand the domain.

1. Define push and pull models

Briefly explain that in push, metrics are sent from the source to the collector, while in pull, the collector fetches metrics from the source. Mention common examples like Prometheus (pull) and StatsD (push).

2. Compare across key dimensions

For each dimension (reliability, backpressure, service discovery, failure isolation), describe how push and pull handle it, highlighting tradeoffs. For example, pull provides natural backpressure, while push may require buffering.

3. Discuss ML-specific considerations

Relate the comparison to ML metrics: training metrics (e.g., loss, accuracy) are often pushed from distributed workers, while serving metrics (e.g., latency, QPS) are often pulled from model servers. Mention challenges like high cardinality and dynamic scaling.

4. Provide selection criteria

Give guidelines on when to choose push vs pull: push for short-lived jobs, serverless, or when the collector cannot reach the source; pull for long-running services, when you need centralized control, or when service discovery is available.

5. Conclude with tradeoffs and hybrid approaches

Summarize that there is no one-size-fits-all; often a hybrid model (e.g., push for events, pull for state) works best. Mention that the choice impacts reliability, scalability, and operational complexity.

Key Points to Mention

  • Reliability: Push can lose metrics if the collector is down; pull can miss scrapes if the target is down, but both can be mitigated with retries and buffering.
  • Backpressure: Pull naturally applies backpressure by controlling scrape rate; push requires the collector to handle bursts, potentially leading to dropped metrics or overload.
  • Service discovery: Pull relies on service discovery to find targets; push requires the source to know the collector's address, which can be simpler in dynamic environments.
  • Failure isolation: Pull isolates failures to individual targets; push can cause a cascading failure if the collector fails, affecting all sources.
  • ML-specific: Training jobs are often push-based due to their ephemeral nature; serving metrics are often pull-based for consistency and control.
  • Hybrid approaches: Using push for alerts/events and pull for regular metrics can balance tradeoffs.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

What aggregation and rollup strategies would you use, and where would you apply them: client side, agent side, stream processing, or storage side?

System DesignData Modeling
Author's notes

Blanked for a second on the tradeoffs between doing aggregation early vs late.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the use case and requirements (latency, accuracy, cost, data volume) before recommending strategies. Then propose a hybrid approach that applies aggregation at multiple layers—client, agent, stream, and storage—each optimized for its role, and justify with trade-offs.

Pro tip: Emphasize that aggregation is not just about reducing data volume but also about enabling real-time insights and reducing downstream compute; mention LinkedIn's specific systems like Kafka, Samza, and Venice to show domain awareness.

1. Clarify Requirements

Ask about the specific use case: Is it for real-time monitoring, offline analytics, or ML feature generation? Determine latency, accuracy, and cost constraints.

2. Map Aggregation Layers

Identify where aggregation can occur: client (pre-aggregation), agent (local rollups), stream processing (windowed aggregations), and storage (materialized views, rollup tables).

3. Propose Strategies per Layer

For each layer, suggest specific techniques: client-side sampling, agent-side batching, stream processing with windows, and storage-side pre-aggregation.

4. Justify with Trade-offs

Discuss trade-offs: client-side reduces network but may lose fidelity; stream processing adds latency but enables real-time; storage-side is efficient for repeated queries but adds storage cost.

5. Recommend Hybrid Approach

Conclude with a balanced recommendation, e.g., lightweight client aggregation, stream processing for real-time metrics, and storage rollups for historical analysis.

Key Points to Mention

  • Lambda architecture vs. Kappa architecture for combining batch and stream processing
  • Windowed aggregations (tumbling, sliding, session) in stream processing
  • Pre-aggregation and rollup tables in data warehouses (e.g., Apache Pinot, Venice)
  • Client-side aggregation for reducing network load (e.g., in mobile apps)
  • Agent-side aggregation for edge devices or log collectors (e.g., Fluentd, Logstash)
  • Trade-offs between latency, accuracy, cost, and complexity

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you handle high-cardinality labels, downsampling, late or out-of-order data, retention policies, and backfill in a time-series database?

System DesignData ModelingTechnical Trade-offs
Author's notes

Four questions in one, basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the time-series database, such as query patterns, write throughput, and data volume. Then, systematically address each challenge (high-cardinality labels, downsampling, late/out-of-order data, retention, backfill) by discussing trade-offs and proposing solutions that balance performance, cost, and accuracy. Finally, tie your answer back to LinkedIn's scale and ML use cases, emphasizing practical experience and lessons learned.

Pro tip: Demonstrate awareness of the operational impact: for example, mention how high-cardinality labels can explode index size and query latency, and propose concrete mitigation like label pruning or using a TSDB with native support for high cardinality. Also, highlight that late data handling often requires a trade-off between accuracy and latency, and suggest using watermarks or allowed lateness in stream processing.

1. Clarify Requirements and Constraints

Ask about the expected data volume, query patterns (e.g., real-time vs. analytical), write rate, and consistency requirements. This will guide the choice of techniques and trade-offs.

2. Address High-Cardinality Labels

Discuss strategies like limiting label cardinality, using separate indexes or inverted indexes, and choosing a TSDB that handles high cardinality efficiently (e.g., Prometheus with relabeling, or specialized stores like M3DB).

3. Handle Downsampling and Retention

Explain how to implement downsampling (e.g., rollup tables, continuous queries) to reduce storage and improve query performance for older data. Describe retention policies (e.g., time-based deletion, tiered storage) to manage data lifecycle.

4. Manage Late and Out-of-Order Data

Propose mechanisms like watermarks, allowed lateness, and idempotent writes to handle late data. Discuss trade-offs between immediate ingestion and batch correction, and how to ensure correctness.

5. Implement Backfill and Reprocessing

Outline a backfill strategy: use batch processing to reprocess historical data, ensure idempotency, and coordinate with downsampling and retention policies to avoid inconsistencies.

Key Points to Mention

  • High-cardinality labels: impact on index size and query performance; mitigation via label design, sharding, or using TSDBs with native support.
  • Downsampling: techniques like rollup tables, continuous queries, and materialized views; trade-offs between storage savings and query flexibility.
  • Late/out-of-order data: watermarks, allowed lateness, and idempotent writes; trade-offs between latency and accuracy.
  • Retention policies: time-based deletion, tiered storage (hot/warm/cold), and compliance considerations.
  • Backfill: batch reprocessing, idempotency, and coordination with downsampling and retention.
  • LinkedIn context: scale, ML use cases (e.g., feature stores, monitoring), and potential integration with existing systems like Kafka, Samza, or Venice.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you capacity plan this system, including sharding, replication, and multi-tenant isolation?

System DesignTechnical Trade-offs
Author's notes

Honestly the part I was least prepared for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's scale, read/write patterns, and ML workload characteristics, then propose a capacity plan that balances sharding, replication, and multi-tenant isolation. Walk through trade-offs like shard key selection, replication factor, and isolation models, and tie them to LinkedIn's specific needs such as low-latency feature serving and model training.

Pro tip: Emphasize that capacity planning is iterative: start with a simple model, monitor key metrics, and adjust sharding and replication as data grows. Also, highlight the importance of tenant isolation for compliance and noisy neighbor prevention, especially in a multi-tenant ML platform.

1. Clarify Requirements and Scale

Ask about data volume, query per second (QPS), latency SLAs, and tenant count to understand the capacity needs. Identify ML-specific requirements like feature freshness and training data size.

2. Design Sharding Strategy

Choose a shard key that distributes load evenly and supports common queries, such as tenant ID or user ID. Discuss trade-offs between hash-based and range-based sharding, and how to handle hotspots.

3. Plan Replication for Availability and Durability

Determine replication factor based on consistency needs and failure tolerance. Explain how replication supports read scaling and disaster recovery, and mention trade-offs like increased write latency and storage cost.

4. Implement Multi-Tenant Isolation

Propose isolation models (e.g., shared database with tenant ID, schema-per-tenant, database-per-tenant) and justify based on security, compliance, and performance. Discuss how isolation interacts with sharding and replication.

5. Address ML-Specific Considerations and Trade-offs

Cover how capacity planning impacts feature serving, model training, and online/offline consistency. Discuss trade-offs between cost, performance, and complexity, and suggest monitoring and auto-scaling.

Key Points to Mention

  • Shard key selection and its impact on query performance and hotspot avoidance
  • Replication factor and consistency models (e.g., eventual vs. strong consistency)
  • Multi-tenant isolation patterns and their trade-offs (cost, security, noisy neighbor)
  • Capacity estimation techniques (e.g., back-of-the-envelope calculations for storage and QPS)
  • ML workload characteristics: feature store, training data pipelines, and low-latency inference
  • Monitoring, auto-scaling, and iterative capacity planning

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you test and monitor the monitoring system itself?

System DesignRoot Cause Analysis
Author's notes

Kind of a fun meta question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as ensuring the reliability and trustworthiness of the monitoring system itself, covering both its components and the ML models it monitors. Discuss testing strategies (unit, integration, end-to-end, chaos) and monitoring techniques (meta-monitoring, health checks, anomaly detection on monitoring data). Emphasize proactive detection of failures and drift in the monitoring pipeline.

Pro tip: Highlight the importance of monitoring the monitoring system's data quality and freshness, as stale or incorrect monitoring data can lead to false confidence or missed incidents. Also, mention that you would apply the same rigor to monitoring the monitoring system as you would to production ML models, including canary deployments and A/B tests for changes.

1. Identify critical components and failure modes

Map out all parts of the monitoring system (data collection, processing, storage, alerting, dashboards) and enumerate potential failure modes such as data loss, latency, false alerts, and silent failures.

2. Design comprehensive tests

Implement unit tests for individual components, integration tests for data flow, end-to-end tests simulating real incidents, and chaos engineering to test resilience under failures.

3. Implement meta-monitoring

Set up health checks, heartbeats, and synthetic probes to continuously verify that the monitoring system is operational and producing expected outputs. Monitor key metrics like data freshness, completeness, and alert delivery latency.

4. Detect anomalies and drift in monitoring data

Apply statistical and ML-based anomaly detection on the monitoring system's own metrics to catch subtle issues like gradual degradation or concept drift in the monitored models.

5. Establish incident response and feedback loops

Define escalation paths for when the monitoring system fails, and regularly review incidents to improve tests and monitoring coverage. Use canary deployments for changes to the monitoring system.

Key Points to Mention

  • Meta-monitoring: monitoring the monitoring system's health and performance
  • Data quality checks: freshness, completeness, accuracy of monitoring data
  • Chaos engineering and fault injection to test resilience
  • Synthetic probes and canary metrics to detect silent failures
  • Alerting on monitoring system failures (e.g., no data received)
  • Regular audits and reviews of monitoring coverage and effectiveness

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.