3 ms·
Efficiently determining the news feed per user is a pretty big technical challenge when you get to 500m users (which probably means a million or so news feed re
by pwaring 15y ago
Efficiently determining the news feed per user is a pretty big technical challenge when you get to 500m users (which probably means a million or so news feed requests per second, possibly more).
If you think about it, there are broadly two ways you can handle me posting an update which appears in my friends' news feeds:
1. Post an item which is has my user ID as the owner, and each time one of my friends reads their news feeds you join together all the news items based on a 'friend' relationship (presumably a many-to-many link), order them by timestamp and do all the filtering necessary where they've clicked "don't show this kind of update from this user".
2. Store a news feed per user and update all my friends' news feeds when I post something new, remembering to keep everything in sync should I delete the post, be removed as a friend etc.
- windsurfer 15y agoI believe the news feed was originally generated every 20 to 40 minutes for each user, regardless of whether they were on the site. This way, caching was extremely effective and the architechture could withstand downtime on the feed generators. I remember a few days where the news feed didn't update at all.