← Questions

Design data pipelines for a short-video app

0
AppleSystem designLast asked Jan 2026

A system design interview question asked in Apple's technical phone screen, last asked Jan 2026. It tests data engineering, pipelines and analytics.

Design the data platform behind a large short-video app. Clients emit events (views, watch time, likes, shares, follows, uploads). Analysts need a warehouse to query, product needs real-time dashboards, and the recommendation team needs fresh features.

Requirements

  • Functional: collect events from mobile clients and backend services; process them in streaming and in batch; model them in a warehouse with fact and dimension tables; serve near-real-time aggregates (views per video per minute, trending videos) to dashboards; feed features to recommendation.
  • Non-functional: billions of events a day with traffic spikes; dashboard freshness in seconds; no lost events; correct counts despite duplicates and late arrivals; reasonable storage cost.

Clarifying questions

  • What freshness does each consumer need: seconds for dashboards, hours for analysts?
  • Is "exactly once" required for every metric, or are approximate counts acceptable for some?
  • How late can mobile events arrive (offline phones)?
  • What are the main queries analysts run?

What a strong answer covers

  • Ingestion: client batching, a collector service, a durable log (Kafka-like) partitioned by a key such as user or video, schema registry and versioning.
  • Stream processing: windowed aggregations with event time and watermarks, deduplication by event ID, state checkpoints, handling late events.
  • Batch layer: raw data in object storage partitioned by date and hour, daily jobs that rebuild corrected aggregates, backfills.
  • Warehouse model: a star schema (fact tables for views and engagement, dimensions for users, videos, creators, devices), partitioning and columnar storage, slowly changing dimensions.
  • Data quality: volume and null checks, freshness alerts, reconciliation between streaming and batch numbers.
  • Failure handling: replay from the log, idempotent sinks, poison messages.

Follow-ups

  • A video goes viral and one partition is overwhelmed. What do you do?
  • Real-time view counts differ from the next day's batch numbers. How do you explain and reconcile them?
  • Users ask to delete their data. How does that flow through every store?

Where it's asked

  • Apple · Technical phone screen · Last asked Jan 2026

What it tests

data engineering · pipelines · analytics

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing