PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Databricks

Design a Music Playlist Service

Last updated: Aug 5, 2026

Quick Overview

Design a playlist service for creating lists, adding or removing tracks, reordering items, and reading deterministic playback order. Examine retry-safe mutations, duplicate track occurrences, concurrent edits, storage choices, pagination, caching, and recovery.

  • hard
  • Databricks
  • System Design
  • Software Engineer

Design a Music Playlist Service

Company: Databricks

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

## Design a Music Playlist Service Design a service where users create playlists, add or remove tracks, reorder items, and retrieve a playlist in playback order. Focus on the service contract, storage model, concurrent edits, and reliable reads rather than frontend implementation. ### Constraints & Assumptions - A playlist has a stable ID and owner; authorization for shared editing must be clarified. - The same track may appear more than once in one playlist, so playlist-item identity is distinct from track identity. - Every mutation is retryable and must not duplicate an item after an ambiguous client timeout. - Ordering must remain deterministic under inserts, moves, and concurrent edits. - Required catalog size, playlist size, traffic, collaboration semantics, and freshness must be measured rather than assumed. ### Clarifying Questions to Ask - Are playlists private, public, or collaboratively editable? - What is the maximum playlist size, and how frequently are items reordered? - Must clients read their own edits immediately? - Are track metadata and availability owned by this service or by a separate catalog? - Is playback history, recommendation, or real-time co-editing in scope? ### Part 1 — Define APIs and the Data Model Specify operations for creating a playlist, reading it, adding and removing an item, and moving an item. Define playlist, item, track reference, permissions, and version fields. #### What This Part Should Cover - Stable playlist-item IDs even for repeated tracks. - Idempotency keys for creation and insertion. - Conditional mutations using a playlist or item version. - A read response with deterministic order and continuation behavior for large playlists. ```hint Model an occurrence, not just a track Two copies of one track need separate identities if a user can move or remove only one occurrence. ``` ### Part 2 — Maintain Ordering Under Edits Choose an ordering representation and explain the cost of inserting between items, moving an item, deleting an item, and occasionally repairing or compacting order keys. #### What This Part Should Cover - Why rewriting every later numeric position can become expensive. - Fractional or sparse order keys, linked relationships, or another explicit strategy. - Conflict behavior when two clients edit from the same version. - A safe rebalance path that does not expose mixed ordering states. ```hint Separate logical order from array position An order key can leave space between neighbors so most inserts do not renumber the entire suffix. ``` ### Part 3 — Serve, Scale, and Recover Describe the authoritative write path, caches or read replicas, event publication, hot playlists, deletion, observability, and repair of derived state. #### What This Part Should Cover - One authoritative mutation transaction plus a durable outbox or change stream. - Cache keys and invalidation tied to playlist versions. - Protection against one very large or popular playlist becoming a hot key. - Reconciliation, audit history, and metrics for conflicts, lag, and stale reads. ```hint Version every derived view A cache or search projection should reveal which authoritative playlist version it represents. ``` ### What a Strong Answer Covers - A clear playlist and item contract with authorization and idempotency. - Efficient, deterministic ordering and explicit concurrent-edit behavior. - A durable authoritative model with repairable read projections. - Scaling choices driven by playlist size, write skew, read traffic, and consistency requirements. ### Follow-up Questions 1. How would you support two users editing the same playlist in real time? 2. What happens when a track becomes unavailable after it was added? 3. How would you clone a million-item playlist without copying every row synchronously? 4. Which invariant would a reconciliation job verify after an ordering-key rebalance?

Quick Answer: Design a playlist service for creating lists, adding or removing tracks, reordering items, and reading deterministic playback order. Examine retry-safe mutations, duplicate track occurrences, concurrent edits, storage choices, pagination, caching, and recovery.

Related Interview Questions

  • Design Chat APIs, Storage, and Core Message Flows - Databricks (hard)
  • Design Chat Deletion Semantics Under Concurrent Sends - Databricks (medium)
  • Design a Durable Concurrent Event Writer - Databricks (hard)
  • Design a Collaborative Playlist Editor - Databricks (medium)
|Home/System Design/Databricks

Design a Music Playlist Service

Databricks logo
Databricks
Jul 25, 2026, 12:00 AM
hardSoftware EngineerOnsiteSystem Design
0
0

Design a Music Playlist Service

Design a service where users create playlists, add or remove tracks, reorder items, and retrieve a playlist in playback order. Focus on the service contract, storage model, concurrent edits, and reliable reads rather than frontend implementation.

Constraints & Assumptions

  • A playlist has a stable ID and owner; authorization for shared editing must be clarified.
  • The same track may appear more than once in one playlist, so playlist-item identity is distinct from track identity.
  • Every mutation is retryable and must not duplicate an item after an ambiguous client timeout.
  • Ordering must remain deterministic under inserts, moves, and concurrent edits.
  • Required catalog size, playlist size, traffic, collaboration semantics, and freshness must be measured rather than assumed.

Clarifying Questions to Ask Guidance

  • Are playlists private, public, or collaboratively editable?
  • What is the maximum playlist size, and how frequently are items reordered?
  • Must clients read their own edits immediately?
  • Are track metadata and availability owned by this service or by a separate catalog?
  • Is playback history, recommendation, or real-time co-editing in scope?

Part 1 — Define APIs and the Data Model

Specify operations for creating a playlist, reading it, adding and removing an item, and moving an item. Define playlist, item, track reference, permissions, and version fields.

What This Part Should Cover Guidance

  • Stable playlist-item IDs even for repeated tracks.
  • Idempotency keys for creation and insertion.
  • Conditional mutations using a playlist or item version.
  • A read response with deterministic order and continuation behavior for large playlists.

Part 2 — Maintain Ordering Under Edits

Choose an ordering representation and explain the cost of inserting between items, moving an item, deleting an item, and occasionally repairing or compacting order keys.

What This Part Should Cover Guidance

  • Why rewriting every later numeric position can become expensive.
  • Fractional or sparse order keys, linked relationships, or another explicit strategy.
  • Conflict behavior when two clients edit from the same version.
  • A safe rebalance path that does not expose mixed ordering states.

Part 3 — Serve, Scale, and Recover

Describe the authoritative write path, caches or read replicas, event publication, hot playlists, deletion, observability, and repair of derived state.

What This Part Should Cover Guidance

  • One authoritative mutation transaction plus a durable outbox or change stream.
  • Cache keys and invalidation tied to playlist versions.
  • Protection against one very large or popular playlist becoming a hot key.
  • Reconciliation, audit history, and metrics for conflicts, lag, and stale reads.

What a Strong Answer Covers Guidance

  • A clear playlist and item contract with authorization and idempotency.
  • Efficient, deterministic ordering and explicit concurrent-edit behavior.
  • A durable authoritative model with repairable read projections.
  • Scaling choices driven by playlist size, write skew, read traffic, and consistency requirements.

Follow-up Questions Guidance

  1. How would you support two users editing the same playlist in real time?
  2. What happens when a track becomes unavailable after it was added?
  3. How would you clone a million-item playlist without copying every row synchronously?
  4. Which invariant would a reconciliation job verify after an ordering-key rebalance?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Databricks•More Software Engineer•Databricks Software Engineer•Databricks System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

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

Product

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

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.