Instagram System Design | Meta | Facebook

preview_player
Показать описание
Interviewers frequently ask candidates to design the architecture of a social media platform like Instagram. Gain valuable knowledge about system scalability, handling high concurrent uploads, optimizing news feed generation, and implementing features like likes, comments, and user following.

Learn how Instagram's microservices architecture, distributed queues, and caching mechanisms come together to create a seamless user experience. Explore the components such as the image service, feed service, fanout service, and more that power Instagram's core functionalities. Gain insights into the scalability and performance optimizations implemented by Instagram to handle millions of users and their interactions. Whether you're a software engineer, aspiring developer, or simply curious about the inner workings of popular social media platforms, this video is a must-watch!"

System Design Interview Basics Playlist:

AWS Certification:
Рекомендации по теме
Комментарии
Автор

okay not only is this a great explanation but your presentation voice is spectacular, its so easy to listen to you

chelschubb
Автор

there is a problem with user feed design. You mentioned that service first fetches the followers list from metadata service and then gets posts corresponding to each follower. Imagine if a social media addict following 100K users, do u fetch 100K users and all their posts, feed service will take forever to load.

Techie-pkyd
Автор

Storage Capacity per month = Avg Image size * Image uploaded per month by 1 user * MAU (10% of 10^9 registered users ) = 0.005 GB * 500 * 10^8 = 250 PB
Network Capacity = Total data transferred/Time taken = Concurrent Uploads * Avg Image size/avg image upload time = * 0.005GB/5 = 100Gbps

ClocianClokes
Автор

Instead of creating the Feed on the fly, wouldn´t it be less "stressful" to the DB and Servers to use a NoSQL DB to store a "pre-bulit" Feed? Meaning when a post/coment/like is created a worker updates a feed object in a NoSQL db?
This way, fetching the feed would be just accessing one object instead of "Joining" massive tables, what do you think of this approach?

Giullianosiviero
Автор

That is a great design. How to handle a use case of user scrolling a feed. We have to track that user viewed the post/feed. So, we won't show the feed once again on his timeline. How to handle this use case.

saravanasai
Автор

Thank you bro it's very helpfull for me. ❣

RH_Fan_Group
Автор

Kindly explain your capacity planning, how did you reach those numbers, you just say the numbers and move on. Explain the formula and how you reached the number, as it is not clear, our Capacity planning numbers is not matching yours

abdulhye
Автор

In the Schema design represented as relational, the design is not normalised.
We already have a relation between user and post in post table.
You could have used the id of this table as foreign key in comments and like table.

ankitpersie
Автор

My question is do we really. need so many microservices for like, comment, feed, etc? Or one service with multiple endpoints/API? What are the pros and cons?

evalyly
Автор

Thank you, you did a great job. It is beneficial.

nomamkhan
Автор

Really very awesome video. Thankyou so much for great explanation 🔥🔥

divyeshmali
Автор

for upload, I think endpoint should be done through user, something like this: POST user/{userId}/Image

uzmaahmed
Автор

Very well explained the high level overview!

nachiketkanore
Автор

Excellent video with detailed information.

SanjayKumar-rwgj
Автор

is it a beginner mistake or does the requirement calculation's maths not add up?

angadmanroy
Автор

Sorry. This may be a question out-of-context. Just curious to know what tools you use for designs and diagrams

sabyasachimohapatra
Автор

For new feed generation, why is the request not using the news feed cache that was asynchronously generated by the fanout service by the user's followers? Or is it an hybrid approach that you mentioned here. For users who have a lot followers the feed service queries the metadata and image service to get the feed in real time, but for the users who have few followers it, the fanout service creates a newsfeed cache?

deepanshusuneja
Автор

Great video.

I’m delivering a mobile app product to the Austin, Texas market that’ll be supported by a similar framework, with an additional layer of ML to encourage in person exploration based on relational account interests

XdoughboyxX
Автор

tbh, I thought other than meta employees or big tech people who're into this stuff, no common people know these things. Because this is legitimately complex. Obv they know stuffs we don't hence they're the leaders of the world and we're the followers.

SAURABHGUPTA_DINOSAUR
Автор

you read very fast. Very difficult to understand your voice and fit into mind. Please take some more time and try to teach slow

AbhiKumar-kqkx