6 Comments
Jan 25Liked by Neo Kim

Is it not insanely inefficient to pre-compute everyone's feed? That just seems wild to me. Is that a common approach or is it unique to HashNode?

Expand full comment
author

Twitter also precomputes the feed. But only tweets from accounts without a significant following gets written to the follower's feed. The popular users gets a fetch the tweet on the fly approach.

Expand full comment

Great article!

I learned a lot of new information. The most shocking part was discovering that feed preferences use a "ranking algorithm," not just machine learning. I always thought it was only machine learning.

It's also interesting that the feed is pre-calculated in cache before a user visits, saving computer resources.

Thanks, Neo, for teaching us this!

Expand full comment

Great article Neo. Feeds are everywhere nowdays, Substack notes starts to gain popularity too. I'm curious to know how bad is the performance for non active users, who login after a long time with nothing in Redis :)

Expand full comment
author

I don't know about Hashnode's case. But Twitter queries the database to create their feed/timeline for inactive users, so slightly slower than querying Redis.

Expand full comment

ranking approach is not explained well, are they fetching IDs from the redis list(linked-list) and sorting and re-inserting or just interesting at the end of the list?

Expand full comment
Error