Design43 min
Edge servers that serve content from close to the user.Core featuresLow latency from nearby edgesOffloads traffic from the originCaches static files and mediaAbsorbs traffic spikes and DDoSWhen to useStatic assets, images and videoUsers spread far from your originCacheable API responses at the edgeKeeping hot data in fast storage to skip slow lookups.Cheap, durable storage for files and blobs, like S3.Core featuresExtreme durability (11 nines)Virtually unlimited scaleLow cost per GB, storage tiersPresigned URLs for direct uploadsWhole-object writes, no in-place editsWhen to useUser uploads, media and backupsLarge files rather than queryable recordsData lakes and long-term archives
PremiumMusic Streaming / Spotify
Tap any song in a catalogue of well over a hundred million and hear it straight away, on a phone on the bus, a laptop or a plane with no signal, with the next song already waiting when this one ends.
What they’re really testing: A listener taps a song and expects sound before they notice any wait: about 200 ms, on a mobile network. Most of a catalogue of ~200M tracks is almost never played, so no cache near the listener holds it, and every file is encrypted, so starting a song needs a key as well as the bytes.
Premium
This design is on the Premium plan
Readers with Lifetime Access read it in full. Already bought it? Sign in from the top bar.
What’s inside
- Primary concepts and the hard part
- Requirements
- API / Model
- High-level architecture
- Trade-offs and deep dives
- Possible follow-up questions