Featured article for the topic Design Instagram · picked by the needcode team
Design Instagram: photo storage, feeds and CDNs
needcode teamFeatured AuthorPosted · 1 min read
Instagram is Twitter with heavier payloads. The feed design carries over; the new problem is storing and serving billions of images.
Upload path#
Clients upload straight to object storage with a presigned URL, so image bytes never pass through your app servers. A worker then creates resized variants.
Serving#
Images are immutable, so cache them forever on a CDN and put a content hash in the URL. A new version gets a new URL.
Feed#
Reuse the hybrid fan-out from Design Twitter. Store post IDs in the timeline cache and hydrate them with metadata on read.
Comments