Instagram's feed differs from Twitter:
Content type: Photos and videos are heavy. CDN is critical.
Feed ranking: Not chronological. ML model predicts engagement. Factors include:
- Relationship (close friends rank higher)
- Interest (content you've engaged with before)
- Recency (still matters, but not primary)
Architecture:
- Media stored in S3, served via CDN
- Feed generation similar to Twitter (hybrid fanout)
- Ranking service scores posts before display
Infinite scroll: Paginate with cursors. Pre-fetch next page while user views current.