What are the scaling issues to keep in mind while developing a social network feed? – Social Networking

social network,social network feed,social media,social,social network (industry),social networks,social feed,network,how to make social network website,global real estate social network,social networking,social media app,new social media,words for social media,social marketing,social media marketing,social media detox,social networking service (website category),no social media,social media marketing business,social media platform
What are the scaling issues to keep in mind while developing a social network feed – Social Networking

What are the scaling issues to keep in mind while developing a social network feed? – Social Networking

Social network feed  – The most common issues when scaling a news feed is about feed publishing. When a user loads all the feeds from his friends, it can be an extremely costly action. Remember that a user can have thousands of friends and each of them can publish a huge amount of updates especially for high profile users.

Basically there are two common approaches here – push and pull.

For a push system, once a user has published a feed, we immediately pushing this feed (actually the pointer to the feed) to all his friends. The advantage is that when fetching feed, you don’t need to go through your friends list and get feeds for each of them. It significantly reduces read operation. However, the downside is also obvious. It increases write operation especially for people with a large number of friends.

For a pull system, feeds are only fetched when users are loading their home pages. So feed data doesn’t need to be sent right after it’s created. You can see that this approach optimizes for write operation, but can be quite slow to fetch data even after using denormalization.

The process of pushing an activity to all your friends or followers is called a fanout. So the push approach is also called fanout on write, while the pull approach is fanout on load. In fact, you can do a combination of both. Specifically, if you are mainly using push model, what you can do is to disable fanout for high profile users and other people can only load their updates during read. The idea is that push operation can be extremely costly for high profile users since they have a lot of friends to notify. By disabling fanout for them, we can save a huge number of resources. Actually Twitter has seen great improvement after adopting this approach.

By the same token, once a user publish a feed, we can also limit the fanout to only his active friends. For non-active users, most of the time the push operation is a waste since they will never come back consuming feeds.

Thank you. Please Help Us Share This Post …….

NEXT TO >

................................................................................................................

Leave a Reply

Your email address will not be published.