4.2 MB
one 3½-minute song at 160 kbps
Unlike video, audio is small. Every format of every track is about 5.5 PB, and the top 100,000 tracks fit on one CDN server.
Where do 250 ms go between tap and sound?
Never open a connection on the tap. Keep connections warm, hold keys as day-long leases, and ask for just the first 64 KB.
In 2010, 61% of plays were predictable: the last track ended, or the listener pressed next.
The trick
Fetch the next track 30 s before the end and trim encoder padding. The join is gapless.
When does a song pick its quality?
Bad: Every few seconds, like video
Machinery built for gigabyte films.
Good: Once, as the track starts
A 160 kbps song downloads 12× faster than it plays on 2 Mbps.
Asha and Ravi insert into the same gap at once
Integer positions would collide. Fractional keys don’t. Between c and m you can mint h. Both inserts survive, and nothing is renumbered.
700k/s
playback events at peak
Royalties are split by these counts, so this is a ledger, not a dashboard. At-least-once into a durable queue; exactly once in the ledger.
Nine days offline. How do downloads stay licensed?
- Each file encrypted once with its own key
- Keys wrapped to the phone’s secure hardware
- Licences expire in 30 days
- Check-in uploads plays, then renews
Remember
Three planes. Catalogue: rights and search, filtered by market. Audio: small encrypted files from CDN edges and device caches. Events: at-least-once in, exactly once in the royalty ledger.