1.

Design Facebook’s newsfeed system.

Answer»

Facebook’s newsfeed allows users to see what is happening in their friend's circle, liked pages and groups followed.

  • What are some of the Required Features?
    • Generate newsfeed USING posts from other system ENTITIES that the user follows.
    • Newsfeed posts can be of text, image, audio or video format.
    • Append new posts to the user’s newsfeed in close to real-time.
  • What are some of the Common Problems encountered?
    • What happens if the new post sees a LOT of latency to get appended to the news feed?
    • Can the algorithm handle sudden user load?
    • What posts should take priority for displaying in the news feed?
  • Possible tips for consideration:
    • EVALUATE the PROCESS of fanout for publishing posts to the followers
    • Check how sharding can be achieved efficiently for handling heavy user load. The feed data of a user shouldn't be put into multiple servers. Instead, sharding can be done on user ids.


Discussion

No Comment Found