Тёмный

System Design Interview - Distributed Message Queue 

System Design Interview
Подписаться 101 тыс.
Просмотров 272 тыс.
50% 1

Please check out my other video courses here: www.systemdesignthinking.com
Topics mentioned in the video:
- Synchronous vs asynchronous communication.
- Functional (send message and receive message) and non-functional (scalability, high availability, high performance, durability) requirements.
- High-level architecture of a distributed message queue.
- VIP, Load balancer
- FrontEnd service and its responsibilities (request validation, authentication and authorization, SSL termination, server-side data encryption, caching, rate limiting (throttling), request dispatching, request de-duplication, usage data collection).
- Metadata service, distributed cache, consistent hashing ring.
- Data storage options (leader-follower, cell-based architecture).
- Data replication, message delivery semantics (at most once, at least once, exactly once), push vs pull, FIFO and message ordering, security, monitoring.
Inspired by the following interview questions:
Amazon (leetcode.com/discuss/intervie...)
Uber (www.careercup.com/question?id...)

Наука

Опубликовано:

 

24 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 348   
@stillmattwest
@stillmattwest 2 года назад
This was the first video I'd seen from this channel. This is some next-level system design content. Way more in-depth than other videos I've seen. Unfortunately, it doesn't look like there have been any recent uploads, which is really too bad.
@random-characters4162
@random-characters4162 Год назад
Yeah! But the content is so dense! I mean it more than enough
@vasilyvlasov3255
@vasilyvlasov3255 2 года назад
This is absolutely the best content on RU-vid on the system design topic! No "scratching the surface" bullshit, but rather very in-depth and concrete explanation on how to navigate successfully through the system design interviews. Thank you Mikhail for your great efforts! Большое спасибо, Михаил! One thing bothers me though, there haven't been any recent updates on the channel. I'm pretty sure, all the people here will appreciate and support if Mikhail decides to continue his endeavours and uploads new videos! Anyway, thanks a lot!
@adityabahuguna6815
@adityabahuguna6815 5 лет назад
Appreciate your efforts on aggregating and delivering such quality content in such a lucid manner. I don't think there is better content than this anywhere on youtube especially for system design topics. Wow ! (Y)
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you, Aditya. Appreciate your kind words.
@TheMsnitish
@TheMsnitish 3 года назад
@Jordan Apollo SPAM Alert
@kumarchandan9685
@kumarchandan9685 2 года назад
Totally agree, top quality content
@Dragoon77
@Dragoon77 5 лет назад
I've watched the whole series already, thanks for the great quality content! looking forward for more
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you Dragoon77! Working on more videos.
@victormartins-software3912
@victormartins-software3912 3 года назад
I can’t thank you enough, I was really struggling to grasp these topics and your explanations really helped me put it all together 🙏 excellent work!
@deephorse6110
@deephorse6110 3 года назад
Thank you for summarizing precisely about what can be covered in a 40 minute time limit. Knowledge is one part which is built over learning and experience. Your video really helps to focus on structuring and expressing the knowledge in a coherent manner. Thank you.
@debasishnayak5576
@debasishnayak5576 4 года назад
Normally I play videos in 1.5x or 2x. Your videos have so much information that I am afraid of losing some fundamentals if I play in 2x. Outstanding quality. Please keep making such videos.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Debasish. Really appreciate the feedback!
@jamesyin3220
@jamesyin3220 2 года назад
This is the best content on system design I've ever seen. Please consider resuming the journey! We'd love to ride along!
@jhnmn
@jhnmn 5 лет назад
I almost never comment on RU-vid but this undoubtedly deserves an exception. Thank you for the superb quality content you’ve put together. I wouldn’t be surprised if this series becomes the de facto video resource for systems design and architecture interviews. Hope you keep uploading!
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you, Johan, for all the kind words! More videos to come.
@SudeeptaSood
@SudeeptaSood Год назад
can't thank you enough for this video. All of these components are building blocks and the interviewer can dig deep as to how the requests are handled from client to server. Awesome video
@HellSamael
@HellSamael 3 года назад
I have been following some system design channels on youtube and this one is by far the best. Well structured, it discusses tradeoffs, solutions are clear.... In one word, AWESOME! Thank you very much.
@harjos78
@harjos78 3 года назад
This is pure GEM!.. Amazing crystal clear explanation on Distributed computing concepts. Best tutorial till date on whole of youtube for system design prep material... Great work
@yooos3
@yooos3 Год назад
wow! This is so to the point and even the duration of the video is as good as an actual interview discussion! Touched so many "must know" topics!
@ShivaSomapur
@ShivaSomapur 2 года назад
I don't think any other youtube video on System Design goes this deep into explaination. Thanks for your efforts in bringing these videos to all of us.
@suzi3245
@suzi3245 Год назад
Each word in this video is a golden word. Make sure you don't skip or neglect it. Thank you so much
@pramodsingh4668
@pramodsingh4668 5 лет назад
I love the way you dive in every component one by one.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you for the feedback, Pramod!
@jayendrasingh6580
@jayendrasingh6580 2 года назад
These videos are best resource among all I have gone through. I am surprised, why this channel is not posting any more videos. Good Work and thank you !
@rahulnath9655
@rahulnath9655 11 месяцев назад
this is the best video for systems design I've ever watched. I listened to it at 50% speed to write down every word whereas I usually watch YT vids at 1.5x -- each sentence was invaluable.
@donaldbough3445
@donaldbough3445 Год назад
Amazing video series that goes beyond high level fluff, thank you so much!
@jackson1012-x8e
@jackson1012-x8e 4 года назад
This is the best distributed message queue system design I have seen so far. Many good concepts introduced and summarized , I feel it very helpful by using it as a guideline and read the other documents for more details such as the AWS SQS document. Looking forward to more content in the future.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Hi Jianan. Thank you a lot for the feedback!
@hyunminkim3315
@hyunminkim3315 5 лет назад
Very thorough! Really appreciate your hard work. I can tell your channel will become huge for engineering resources.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you, Hyunmin. Appreciate your feedback and words of encouragement!
@BestURLShortenerBioPageQRCode
@BestURLShortenerBioPageQRCode 10 месяцев назад
On the system design topic, video very in-depth and concrete explanation on how to navigate successfully through the system design interviews. Thank you for this tutorial! ❤❤
@thunrou
@thunrou 4 года назад
Mikhail is the best. His system design videos are systematic and top notch with respect to quality and crispness. Presenting how to finish a complete design in 35 to 40 mins Wow, this is a great feat and only way for us. Prior to watching these videos my ideas and presentation is messy and dis-organized, but these videos gave me the basic sense what is expected in System Design and how to approach it. I take down the notes while watching the videos and try to apply these principles to other interview questions. This is greatly helping with my preparation. Can't thank you enough Mikhail, you are one of my best teachers.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad to hear that, thunrou! Thanks for sharing!
@saumittrasaxena2877
@saumittrasaxena2877 3 года назад
This is quality content. Really appreciate your efforts.
@akhtarmnnit
@akhtarmnnit 4 года назад
I have seen a bunch of youtubers for system design interview...this one is one of the better ones...good way of using graphics while talking instead of mundane approach of heavy talking and using a whiteboard....Great job buddy...I am gonna explore all your video now
@jackieh2195
@jackieh2195 5 лет назад
Please keep uploading! This is great! Thanks
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Sure, we will. Thank you!
@niko79542
@niko79542 4 года назад
Hands down best System Design Channel on youtube. I cannot wait for more videos!
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Niko, for the feedback. Much appreciated! Working on a new video right now.
@bhaveshssharma8826
@bhaveshssharma8826 3 года назад
Best course available on the Internet.
@MrThepratik
@MrThepratik 4 года назад
This is by far the best curated content on system design Wish I had come here before . Keep up the good work
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Hi Pratik. Thank you for the feedback. And welcome to the channel!
@jasonmeyer495
@jasonmeyer495 4 месяца назад
I wish this guy was still making these videos. By far the best of the system design interview content out there (I've watched them all, lol).
@rishabhjain2404
@rishabhjain2404 4 года назад
thank you for working on the subtitles, makes it easier to consume your good content
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Sure, Rishabh! Thanks for letting me know that subtitles help. Every next video will have subtitles as well.
@rishabhjain2404
@rishabhjain2404 4 года назад
Thanks Mikhail. You have excellent english fluency. I am just used to different pronunciations of certain words.
@austinkim7804
@austinkim7804 Год назад
Finally finished going through your videos. Thanks so much!
@akshitg
@akshitg 4 года назад
The quality of the videos that you make are really make. Please continue making such videos.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad you liked it, Akshit. Thanks for sharing!
@BitsnBytes8
@BitsnBytes8 2 года назад
Very good content. Enjoyed going through the video. Thank you. Hope you continue this series
@swapniljain3459
@swapniljain3459 4 года назад
Great work and Explanation . Thanks a lot. This is the best explanation and walk through to prepare for a System design interview.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad you liked it, Swapnil! Thanks for the feedback!
@ankitphophalia9849
@ankitphophalia9849 4 года назад
Just awesome...your approach to solving a system design is amazing. Great content. Thank a lot for your efforts.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Ankit, for the feedback! Glad you liked the video!
@utsavmathur1478
@utsavmathur1478 2 года назад
This is amazing, thank you so much! Very detailed explanation and exactly what I was looking for.
@ThePrabhu1990
@ThePrabhu1990 5 лет назад
This is excellent! Looking for more such videos.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you. We are working on more videos. Feel free to subscribe to stay tuned.
@harshdubey9951
@harshdubey9951 4 года назад
Hi Mikhail, excellent video on the system design course series. Very nicely presented & explained. One of the best channel.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Harsh, for the kind words! And for being active on the channel (actively commenting)! Much appreciated.
@rahuljain070817
@rahuljain070817 4 года назад
One of the best system Design video I have watched, Awaiting more videos.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
More to come! Thank you, Rahul. Appreciate the kind words.
@riteshpatel16
@riteshpatel16 3 года назад
Thank you for all the hard work and such a great explanation of complicated topics. This is way superior to other paid content. I would love to see video on API design that covers how and what. For example, question that say design an API to upload photos from iOS, how do you go about it? What are the good characteristics of an API? What are key components you need to think about while designing an API and so on.
@chiragr1336
@chiragr1336 4 года назад
Thanks allot @Mikhail. Your videos are so fun and easy to watch. I feel it's one of the best specifically for system design and you sound like some Russian Pro coder to top it;) I request you to make a video about all the possible components (load balancers, CDN, etc) in a system design interview that will ever be used, because you keep using few different components for different problems. If we get to know all the components, then we too can arrive at a better solution. Thanks for the great content and keep creating new videos! 👍
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you for the kind words, Chirag! I have been thinking about the same for a while. And there are ideas how to address this. Just need to find more spare time to realize all these ideas ((
@siddharthmanumusic
@siddharthmanumusic 3 года назад
Such a great video with so much information! Many thanks!
@sonty76
@sonty76 2 года назад
Really great content and well paced delivery. Waitiing for more content.
@YashRaithatha1989
@YashRaithatha1989 4 года назад
Just awesome ! Your approach to problem solving is very generic. Really liked it and keep posting such fantastic system design interview questions. This is the best material i have seen till date on the topic. Thanks a lot.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you for the feedback, Yash!
@mputcha
@mputcha 4 года назад
Just the right amount of detail. Surprised it has fewer views. Shows view count is not very reliable. Thank you for the great effort
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Appreciate the feedback, Manju! Thanks.
@SchartzRehan
@SchartzRehan 5 лет назад
This is crisp and clear. Many thanks.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you for the feedback.
@xiaomengwu3399
@xiaomengwu3399 4 года назад
Thank you for your great work! Please keep it up with more great content! :)
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Xiaomeng, for the feedback! More content to come.
@wangjiprc
@wangjiprc 4 года назад
best system design video I had watched.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad to know that!
@mostinho7
@mostinho7 11 месяцев назад
5:10 load balancer availability/single point of failure, can assign multiple A DNS records for our domain (multiple IPS ) when we want multiple load balancers 8:00 usd cases for frontend service 9:15 request deduplocation to achieve exactly once or at most once semantics (the ack response could be lost when sending back to user, so user will retry and we don’t want to process duplicate requests that we already housed) 12:00 reusable components for other system designs
@leoxiaoyanqu
@leoxiaoyanqu 3 года назад
Thanks a lot for your videos! Very helpful! I wonder if it's possible for you to have a mock interview video (e.g. you're on the interviewee side), covering things like what tools/apps would you use for real-world SDIs for better productivity, etc.
@TyzFix
@TyzFix 2 года назад
I am expecting you write a SD book that gives us the same amount of useful information as here. outstanding job!
@culsumu
@culsumu 2 года назад
Your videos are Superb ! Most useful videos on System design. Please start making more videos like this ! More on each component details which helps in System design :) !
@gemtyler8258
@gemtyler8258 3 года назад
keep up the good work! please upload more system design videos!
@ashwinkumar2126
@ashwinkumar2126 3 года назад
Really comprehensive coverage of the topic! Although, would've loved to see more discussion on Asynchronous out-cluster replication. It's tricky to design, eg. what happens when you receive a get request while the data hasn't fully replicated across hosts in a cluster? can we hit all hosts in a cluster? what happens if we receive a get request when the message deletion replication is in progress etc.
@IDONTKNOWWHATTOKEEP
@IDONTKNOWWHATTOKEEP 4 года назад
Really great content. Please keep uploading more videos!
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Narain. I surely will.
@mukesh_srivastav
@mukesh_srivastav 4 года назад
It is full of quality content, It took me around 2-3 hours to completely watch along with preparing notes for this video. And 9 pages of notes it is, initially I thought it would be in 3-4 pages only. It's full of rich content, that I had to note everything down. Thank you. I am looking for a better way to prepare for System Design questions. With this speed, I am not sure how much time It will take for me.
@SystemDesignInterview
@SystemDesignInterview 3 года назад
Hi Mukesh. You are right, preparation for a system design interview is a lengthy process. And it greatly depends on the level you plan to apply and your background. Just take one step at a time. First, try to learn about concepts without going too deep into each one of them. Otherwise, you will find yourself traversing a very deep graph of various interconnected concepts. Second, go deeper with every next iteration, if time allows. Third, use your daily work as a constant source of knowledge. Ask yourself how things in your project/application work. And do not stop asking yourself until you get a pretty solid understanding of a particular feature. It is a big and a very good question you've raised. I should, probably, create a video on how to prepare, depending on how much time one's have.
@mukesh_srivastav
@mukesh_srivastav 3 года назад
@@SystemDesignInterview Thank you so much, Mikhail. I will follow these tips. Really informative.
@vcfirefox
@vcfirefox 2 года назад
I bought your course. Arguably the best investment I made for system design courses so far. Thanks for putting together contents and explaining them so lucidly. I look forward to other two modules.
@sonamsawhney3428
@sonamsawhney3428 Год назад
the course isn't available for new users :(
@nehanigam4997
@nehanigam4997 4 месяца назад
where is the course link?
@deathbombs
@deathbombs 2 года назад
17:08 to clarify option 2, queues are basically each a cluster in this case(each cluster contains a set of queues). Instances are the replications. Interestingly replication for inmemory hosts/instances are handled similarly to nosql nodes
@ruslanda7690
@ruslanda7690 5 лет назад
This is awesome!! Thank you!
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Glad to hear that! Thanks.
@farslan
@farslan 2 года назад
This video is great quality. I think sequential writes should have been suggested in the video. This seems to me the best way to achieve high throughput.
@jmitesh01
@jmitesh01 4 года назад
Summary(notes): 1. Problem statement: Producer sends data and exactly one of the consumers gets the data 2. Resolving ambiguity in the problem statement by asking questions such as scale, priority, and so on... 3. Just focus on the core set of requirements - sendMessage(messageBody), receiveMessage() 4. SLA numbers for the non-functional requirements 5. Components: LB, Control Plane(Metadata-Service), Data Plane-1(Frontend), Data Plane-2(Back-end) 6. FE: Required Cross cutting concerns such as billing, throttling, the most important - routing to Backend since the Backend is stateful and so on. 7. Metadata Service: Caching Layer for routing information and metadata ( high consistency required in case of very few writes, R/W Ratio) 8. Backend Service: API Handling Layer, Storage and so on. Since Backend has to be HA and fault tolerant as it requires a consensus service like ZooKeeper or In-Cluster and Out-Cluster management strategy. ---- Extend the above design of queue creation with queue deletion, message deletion, message replication, delivery semantics( exactly once delivery not supported because it requires 2PC) and Pull vs Push messages, security and monitoring. --- Scalability Bottlenecks, use-case exntensability and use-case supported/limitations?
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Hi Mitesh. Concise and still captures the key ideas. Great summary.
@dipenpatel5226
@dipenpatel5226 3 года назад
Great video! Thanks for uploading it. I have a question about the replication piece. Once an item is popped off the queue in the leaderless, how do we ensure consistency? Is there some sort of quorum that has to happen to avoid another pop request coming to another cluster?
@ryany1111
@ryany1111 3 года назад
Thank you so much for your videos. I have watched all videos in your channel. Waiting for your distributed database video. Hopefully you are still running this channel
@HarpreetKaur-oj5eg
@HarpreetKaur-oj5eg 4 месяца назад
Brilliant content! Please start uploading again!
@evgeniystepankevich7964
@evgeniystepankevich7964 2 года назад
Big thanks for the videos, great material !
@shubhamgoyal3100
@shubhamgoyal3100 2 года назад
Awesome Content, Thanks a ton :)
@victorsmirnov876
@victorsmirnov876 4 года назад
13:17 Strictly speaking, using a database as a backend message store is a valid option (because database = storage engine + high level type system). The problem is that FIFO message ordering semantics, that is usually expected from queues, is not easily achievable on the top of off-the-shelf databases. Because the latter are usually designed for a different query/update patterns than it's common for queues. But some databases can handle this custom case perfectly, and some queues (Kafka) are even positioning themselves as a databases.
@junfu8695
@junfu8695 2 года назад
mysql auto increment id could be an option to implement FIFO queue. Queue name could be a secondary index, and auto increment id is a primary key.
@jamess5330
@jamess5330 Год назад
Very helpful! Another super effective way to prepare system design interviews: Do mock interviews with FAANG engineers at Meetapro.
@mdfarooq7145
@mdfarooq7145 5 лет назад
Thanks for such a great content.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thanks for such a great comment!
@bryanenglish7841
@bryanenglish7841 2 года назад
Wow this is great stuff!
@madhukarm1319
@madhukarm1319 2 года назад
Thank you! This covers a lot of background. One thing i feel should have been covered how strict message ordering is achieved across partitions?
@RR8401674
@RR8401674 5 лет назад
Thanks a lot. That is awesome!
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thanks a lot for the feedback!
@engineerv3248
@engineerv3248 2 года назад
Thank you for great quality content. Excellent explanation, I can't miss single word. Why the series is stopped? Any other resources would you recommend?
@liuzxiao
@liuzxiao 4 года назад
Covered many points similar to that I used in my daily work. Practical and useful!
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thanks liuzxiao! Appreciate the feedback!
@christinakayla
@christinakayla 3 года назад
Great video! I need to watch it a few more times. I got a question thought: Is Kafka a distributed message queue? How is it different than your desgin?
@kumarchandan9685
@kumarchandan9685 2 года назад
Please do more if you can :) excellent content
@GaneshManika
@GaneshManika 3 года назад
Golden quality.
@maciejmatys1817
@maciejmatys1817 2 года назад
Awesome content!
@thtakapu
@thtakapu 3 года назад
Outstanding!
@gaureesha9840
@gaureesha9840 9 месяцев назад
great explanation, thank you!
@turboFalcon777
@turboFalcon777 3 года назад
This is golden!!!
@babadun36
@babadun36 5 лет назад
This is more just Distributed MQ. The video covers the fundamental approaches in modern data intensive distributed systems.
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Hi Ivan. Thank you for the feedback!
@01071985hh
@01071985hh 3 года назад
great content, thank you
@JungShuoPai
@JungShuoPai 3 года назад
Hi! for option B: Small cluster of independent machines We know FrontEnd would look up the mapping info within MetaService to know which cluster to send the message to. But I am not really clear about how FrontEnd could connect to a random machine within a cluster. Does the mapping info with metaService also contain the list of machines within that cluster? Thank you!
@djBC10000
@djBC10000 4 года назад
Great content and explanation, thank you alot
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad to know that!
@ayshakenza5282
@ayshakenza5282 9 месяцев назад
Really helpfull videos, thank you!!!!
@yuankailiu614
@yuankailiu614 2 года назад
Reall enjoy the video, I wish I could upvote multiple times. One thing missing is how to persist message into file system.
@YeteshChaudhary
@YeteshChaudhary 5 лет назад
It would be helpful if you also give a brief intro to RabbitMQ, Kafka and Kinesis/SQS. You talked about SQS briefly, that was really appreciative!
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Hi Yetesh. Sounds like a topic of its own. Let me add this to the TODO list.
@chickentikkasauce1301
@chickentikkasauce1301 4 года назад
Overall great video. Speaker is very knowledgeable.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Thank you, Chicken Tikka Sauce, for all your comments. To this and other videos. Much appreciated!
@drdzdd
@drdzdd 4 года назад
Great video!
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Glad you enjoyed it, sdo sdo!
@reyazahmed9320
@reyazahmed9320 4 года назад
Great content. Thanks a lot. Just one feedback: Would have been great had there been subtitles as I find a bit difficult to get the words.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Hi Reyaz. Thank you for the feedback! Point taken, I will try to add subtitles relatively soon.
@harshdubey9951
@harshdubey9951 4 года назад
Hi Reyaz, you can use inbuilt feature for subtitles provided by RU-vid player. Click on the icon labelled with cc while playing the video. hope it helps until Mikhail provides the subtitles. Thanks
@ChandraSekhar-zu9nw
@ChandraSekhar-zu9nw 4 года назад
Thanks for the great video. Just a question below: If we have multiple consumers, say, application deployed in a cluster and assuming consumers poll for new messages, how do we ensure that only one instance of them gets the message? Do we need to have some distributed lock on the message so that only one consumer would get it?
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Hi Chandra, In case of a pull-based consumer (like the one described in the video) we indeed need a mechanism to "lock" a message. So that it is not available for other consumers. One option is to do something similar to what AWS SQS does: docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html We could have also implement a push-based mechanism, when queue service itself is responsible for sending a message to one of the subscribed consumers (please check a video about Notification Service, similar idea is described there but for pub/sub use case, not a queue). In this scenario queue ensures that only one consumer gets the message by sending it to a single consumer from the list (e.g. using round-robin algorithm). Please let me know if more details are needed.
@ImranAliyev
@ImranAliyev 5 лет назад
really good explanation. Thanks !!!
@SystemDesignInterview
@SystemDesignInterview 5 лет назад
Thank you. Appreciate the feedback.
@shreyasns1
@shreyasns1 2 года назад
Thanks for the video, had one suggestion on rate limiting. Token bucket is widely used and not leaky bucket.
@ravishekhawat5489
@ravishekhawat5489 3 года назад
What will be the most suitable database for metadata service? Also, while summarizing the design at the end, why did you not include zookeeper in the block diagram? We are gonna use zookeeper as the out-cluster manager right?
@suchismitagoswami5609
@suchismitagoswami5609 2 года назад
Really great content. I have one doubt. In the out cluster management option, let's say we split each queue into multiple partition across multiple clusters, and each partition is being handled by separate clusters with replication of data in all the nodes inside the cluster. What if an entire cluster goes down? How will we ensure durability of the message belongs to the partitions managed by that cluster.. Please help me to resolve the doubt.
@chickentikkasauce1301
@chickentikkasauce1301 4 года назад
For monitoring, it’s be helpful to monitor size of the queue. Also number of messages getting queued or dequeued for each host at the queue level.
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Good points!
@jiongwu8119
@jiongwu8119 2 года назад
Thanks for sharing the design. May I ask a question? As you mentioned at 1:22 of the video, in case of queue, the message is received by one and only one consumer. Does it mean, we should create a queue for every consumer?
@omfromam
@omfromam 4 года назад
Great content! Thank you for making this. One thing that seems not clear (at least to me) ~min15-min17 you show the flow of the message from FE to backend node and to receiver. It is unclear how do you separate persisted information between MS (database) and in-cluster manager (ZooKeeper). Both seems to store mapping between Queue name and Leader Host. Do you really need to store this information in two places? How are they synchronized? Why would you need to keep this info in the MS in the first place? Isn't ZooKeeper enough for queue-to-node mapping?
@SystemDesignInterview
@SystemDesignInterview 4 года назад
Both options are fine: 1. When we store mapping in the Metadata service. Zookeeper is used for leader election and leader monitoring. And if leader changes, this information is propagated to the Metadata service. 2. When we store mapping in Zookeeper. Zookeeper is highly optimized for reads. Anyway, this information is stored in one place. So that we avoid any synchronization between configuration storages and have a single source of truth.
@BitsnBytes8
@BitsnBytes8 2 года назад
@@SystemDesignInterview Thank you for answering this question. I had the same doubt when going through the material.
Далее
System Design Interview - Notification Service
25:11
Просмотров 250 тыс.
НАШЛА У СЕСТРЫ СЕКРЕТИК
00:36
Просмотров 298 тыс.
System Design Interview - Distributed Cache
34:34
Просмотров 353 тыс.
System Design Interview - Top K Problem (Heavy Hitters)
36:18
What is a MESSAGE QUEUE and Where is it used?
9:59
Просмотров 955 тыс.
Собираем комп за 500 000 рублей!
6:44:35