System Design Interview Walkthrough: Design Twitter

  Рет қаралды 10,465

Hello Interview - Tech Interview Preparation

Hello Interview - Tech Interview Preparation

8 ай бұрын

*Designing Twitter's System Architecture: A Deep Dive*
Join me as we delve into the intricate system design of Twitter, one of the world's most popular social media platforms. From understanding the core requirements of the platform to the nitty-gritty of microservices, we'll explore how to architect a system that can handle millions of tweets, retweets, likes, and more.
In this video, we'll cover:
- The importance of load balancing and how it's achieved.
- The microservices architecture and how different services interact.
- Data storage solutions, focusing on tweets, replies, and user profiles.
- The unique challenges and solutions of the Twitter timeline service.
- Key security considerations, from authentication to data encryption.
- Monitoring and testing strategies to ensure a robust system.
Key Highlights:
- How "fanout on write" and "fanout on read" strategies optimize the timeline service.
- The role of Elasticsearch in Twitter's search functionality.
- The intricacies of the profile service, including user data storage and follower connections.
- The importance of security, monitoring, and testing in ensuring a robust system.
Disclaimer: This video is a theoretical exploration and does not represent the actual internal workings of Twitter. It's designed to provide a comprehensive understanding of system design concepts.
Want to test your system design skills? Walkthrough a real-time mock interview at [hellointerview.com](www.hellointerview.com) and get instant quality feedback from an AI trained by industry experts.
#systemdesign #twitter #interviewprep #softwareengineering

Пікірлер: 29
@theDevme
@theDevme Ай бұрын
Man, you covered everything. Thank you, please make such videos. Your videos are point-to-point without any distractions.
@binzhou1940
@binzhou1940 Ай бұрын
I have watched many hours of system design videos. This video is the best one that covers majority of the important topics. Thank you for making this!
@alexyoung763
@alexyoung763 6 ай бұрын
Amazing video! One of the best system design videos I've seen. Clean, simple, yet goes over a lot of important topics and beyond. Keep it up!
@landocodes
@landocodes 3 ай бұрын
Hey this was great! Would love to see more of this.
@nargeszirakchianzadeh1134
@nargeszirakchianzadeh1134 10 күн бұрын
Excellent👌
@prostokrasavchik8837
@prostokrasavchik8837 10 сағат бұрын
This is how you do it. Whole twitter in 20 minutes. OP, you are the best. I didn't get though why user profiles need to be stored in a sql db, why mongo would be a poor choice? Analytics can be it's own separate DB. Will a SQL DB sustain analytics and logins with 300+M active users? if you shard the DB, then is it possible to do analytics? Also when a user follows another one, it should be recorded such that timeline takes that into consideration (oh you added it later :) ). What about rate limiters? Is it a separate service such that the throttling data per account is in central place? I liked you touched security, logging and monitoring. Is this something that interviewers are looking for?
@castulo
@castulo 24 күн бұрын
Excelente video, thanks🎉
@Ofekl999
@Ofekl999 2 ай бұрын
You store replies in a separate database, why not store replies and retweets in different databases as well ? their scale is massively different . By the way, your website is probably one of the best I've seen in terms of learning system design - the way you present information with trade offs, questions and answers is really well done.
@repotek
@repotek Ай бұрын
Thanks man 👌 This is what API Gateway server special for. It is to handle any non-functional requirements. like rate-limit, caching, security. etc. But I think you had to mention that to not confuse the beginners
@hello_interview
@hello_interview Ай бұрын
It’s main responsibility is to route api requests to the correct microservice, but it also can handle general responsibilities like auth, rate limiting, ssl termination, etc
@tusharsinha1772
@tusharsinha1772 6 ай бұрын
Thanks for this video. You have definitely covered a lot of topics in breadth, but isn't the expectation in a design interview to atleast deep dive into one of the components ? Would you give a hire feedback for an E5 candidate who presented exactly the same content as that of this video in their onsite interviews ?
@hello_interview
@hello_interview 6 ай бұрын
Great question! This solution would be adequate for an E4 candidate, but not for an E5+ candidate, for the reason you mentioned. As candidates get more senior, the expectation is less breadth and more depth. For an E5 candidate, I'd suggest you find 1-2 places to go deeper. For Twitter in particular, the search component could be one of these places.
@tusharsinha1772
@tusharsinha1772 6 ай бұрын
​@@hello_interviewthanks for your response. Do you have some suggestions reagrding the time distribution to finish a design(including deep dive in one component) in a 40 minute Meta interview ?
@modestasfilipavicius7482
@modestasfilipavicius7482 22 күн бұрын
The pounding sound while dropping a new diagram object is UNBEARABLE 🔨🔨
@hello_interview
@hello_interview 22 күн бұрын
Checkout the new videos. Totally different format and much improved. You won’t see it again :)
@user-fw2wn4ib3d
@user-fw2wn4ib3d Ай бұрын
This is an awesome content. Best so far I have seen when compared to others on this problem . It would have been great to go into details of some topics like , how are we updating redis cache ? What does data model of followers /followee looks like?
@hello_interview
@hello_interview Ай бұрын
Yah tbh this video is pretty high level, targeting more mid level (ic4) candidates. For much more depth check out the other two videos on the channel!
@user-fw2wn4ib3d
@user-fw2wn4ib3d Ай бұрын
@@hello_interview will do . thx!
@mindrust203
@mindrust203 9 күн бұрын
Hey Evan, Around 15 minute, when you create a message queue for timeline fanout -- in this case, wouldn't it be better if we used something like CDC with Kafka/Kinesis to capture new tweets directly from the database? I'm just thinking there might be more failure scenarios to handle with pushing directly to message queue from the tweet service -- i.e. how do we make sure we don't miss tweets for fanout if the message queue goes down? How do we handle if database write fails? Only push it to the queue when write is successful? Also I guess this is a more general question because I've struggled with it interviews -- how do you decide between using a message queue and a stream for a particular problem? Because I've found there is some overlap where both can work
@drew9284
@drew9284 Ай бұрын
Feedback while watching the video - I'm not sure if it's from the diagramming app or added but the pounding sound effect when adding a new service is annoying and detracts from the viewing experience. The content is super helpful though.
@ugene1100
@ugene1100 Ай бұрын
Thank you for the great content. Really appreciate it!
@noextrasugar
@noextrasugar Күн бұрын
Big fan of your explanation since I found you in a Reddit comment! Does this one have a written version? I couldn't find it on the website
@hello_interview
@hello_interview Күн бұрын
Nope, this the only one that doesn’t hit the newsfeed write up should be similar
@suri4Musiq
@suri4Musiq 17 күн бұрын
This is a great resourc, but I don't see the interactive AI powered whiteboard in your website. Is that still in development?
@hello_interview
@hello_interview 17 күн бұрын
Click on mock interviews in the nav then “AI mocks” on the left nav
@sksabiruddin4291
@sksabiruddin4291 14 күн бұрын
font and design components are too small. hard to catch those details
@tony7948
@tony7948 21 күн бұрын
Does twitter mainly use MySQL?
@AlexLiu-gy3mz
@AlexLiu-gy3mz Ай бұрын
You uploaded the video through the API Gateway and service. The bandwidth should be a bottleneck for the the system.
Choosing a Database for Systems Design: All you need to know in one video
23:58
System Design Interview: Design Ticketmaster w/ a Ex-Meta Staff Engineer
58:39
Hello Interview - Tech Interview Preparation
Рет қаралды 21 М.
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 863 М.
Twitter System Design | System Design Interview Question
47:54
codeKarle
Рет қаралды 107 М.
Amazon's TPM: The System Design Interview Guide
24:19
Pratiksha Bakrola
Рет қаралды 21 М.
Twitter system design | twitter Software architecture | twitter interview questions
36:56
Instagram System Design | Meta | Facebook
16:38
ByteMonk
Рет қаралды 27 М.
Design FB Live Comments: Hello Interview Mock
59:50
Hello Interview - Tech Interview Preparation
Рет қаралды 4,9 М.
Designing INSTAGRAM: System Design of News Feed
24:29
Gaurav Sen
Рет қаралды 605 М.
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН