← Back
Home › Systems › Communication and media

music-streaming

music streaming

Spotify

SystemTechniques · 17Primitives · 69 music-streaming CDN and edgecloud · medium: CDNs cache content in hundreds of PoPs near users, cutting latency and egress bills; edge compute runs small code there. Bandwidth price spreads 10x between providers.›Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Matrix factorization for collaborat…machine-learning · medium: Learn a short latent vector per row and per column from the observed cells only; a missing cell is predicted by the dot product of its two vectors.›Adaptive bitrate streamingmedia · medium: The client fetches short HTTP segments and picks each segment's rendition from throughput estimates, buffer level, or both, trading stalls against quality and switches.›Audio fingerprintingmedia · medium: Spectral-peak landmark hashes to identify recordings robustly to noisePsychoacoustic modelmedia · medium: Masking thresholds driving perceptual bit allocationHTTP caching semanticsnetworking · low: The rules (RFC 9111) that decide whether a stored response is still fresh, and how a cheap conditional request revalidates it when it is not.›Media containersmedia · low: MP4/ISO BMFF, fragmented MP4/CMAF, Matroska and MPEG-TS mux/demuxHTTP range requestsnetworking · low: Ask for byte offsets with Range and get a 206 slice back; the standard way to resume, seek and read big remote files piecewise.›BM25 rankingsearch-sort · low: The standard lexical relevance score: IDF-weighted term frequency with saturation (k1) and length normalization (b); default in Lucene, Elasticsearch and SQLite FTS5.›Object storagecloud · low: S3-compatible blob storage at cents per GB-month with 11 nines durability; pick by egress price, request price and latency, not by storage price alone.›LRU and CLOCKsystems · low: LRU evicts the least recently used entry via hash map plus linked list; CLOCK approximates it with a reference bit, so hits take no lock.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesHyperLogLogdata-structures · low: Counts distinct elements in kilobytes with about 1 % error by tracking the longest run of leading zero bits in hashed values per bucket.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›Embeddingsmachine-learning · low: A learned table mapping discrete ids to dense vectors: gather forward, sparse scatter-add backward, row-wise optimizers to keep huge tables cheap.›Audio loudness normalizationmedia · low: EBU R128 / ITU BS.1770 integrated loudness measurement and gainCommon Encryption (CENC)media · low: ISO/IEC 23001-7 fixes how MP4 samples are encrypted and where key ID, IVs and clear/protected byte ranges are stored, so one file serves many DRM systems.›Modified dctnumerics · low: MDCT with TDAC windows for transform audio codingMutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Cooperative schedulingconcurrency · low: Green threads/coroutines yielding at await points on a user-space scheduler+ 10 more techniques+ 53 more primitives

Similar systems

Share the most building blocks with this one.