Skip to content

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.

Text by needcode team, licensed under CC BY-SA 4.0. You may share and adapt it with credit to the author, under the same licence.

Other approaches to Design Instagram

Submit your approach

No other approaches yet. Think you can explain it differently? Write one.

Comments

Loading comments…