Upload once, resize many times, serve from a CDN, and build a feed that doesn't melt.
What is on this board
Parts
- App Mobile app
- API Service · Django
- Originals Object storage · S3
- Sizes Media processor
- Photos CDN
- Users and posts Relational DB · PostgreSQL
- Likes Key-value store · Cassandra
- Feeds Cache · Redis
- Feed builder Worker pool
- New posts Message queue · Kafka
- Safety check ML model
How they connect
- App → API: post photo
- API → Originals: direct upload URL
- Originals → Sizes: new photo
- Sizes → Photos: publish
- Sizes → Safety check: allowed?
- API → Users and posts: post
- API → New posts: posted
- New posts → Feed builder: consume
- Feed builder → Feeds: add to followers
- App → Feeds: my feed
- App → Photos: load photos
- App → Likes: like
Notes and decisions
- Sizes: Thumbnail, feed, full
- Users and posts: Sharded by user
- The app uploads straight to storage: a signed URL keeps gigabytes off the API servers.
More like this
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
URL shortener, like BitlyThe first system design interview question: key generation, heavy reads, a cache in front, and click analytics off the request path.