System Design Interview: Design an Ad Click Aggregator w/ a Ex-Meta Staff Engineer

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 314

  • @krishnabansal7531
    @krishnabansal7531 5 месяцев назад +71

    This kind of content can make someone fall in love with software engineering.

  • @ashishm8991
    @ashishm8991 5 месяцев назад +50

    Finding your channel feels like finding gold!
    There are ton of SD videos on youtube with shallow content basically exactly like you mention what a junior or mid level candidate would do.
    Going indepth for senior and staff is one of the highlight of your content. Please continue doing that.
    Also please don't worry about length of the video. Keep the gold coming :)

    • @PranayDatta
      @PranayDatta 5 месяцев назад

      @hello_interview waiting eagerly for next video

  • @sudarshanpanke7329
    @sudarshanpanke7329 6 месяцев назад +22

    This is by far the best system design interview ever seen on the internet. Keep doing the great work sir...

  • @sherazdotnet
    @sherazdotnet 6 месяцев назад +28

    Watch this and then imagine if Evan puts together a System Design Learning Course. Just image that !!!! I mean we (the learners) will jump on it sooo quickly. This is just absolutely amazing. This is combining years of experience with hands on actual approach that works along with book contents presented in a very professional manner. Evan, think about it 🙂

    • @hello_interview
      @hello_interview  6 месяцев назад +11

      Maybe one day! For now just happy with all the people learning about hello interview and getting tons of free value

  • @omegaminus8195
    @omegaminus8195 3 часа назад

    Literally recommended Hello Interview to everyone I've mocked interviewed with

  • @vcfirefox
    @vcfirefox 2 месяца назад +5

    I have purchased so far
    Alex Xu
    grokking
    system design by Mikhail Smarshchok
    i would say i learned a LOT from the Mikhail Smarshchok as far as internals go
    and then i bumped into your Hello Interview
    ABSOLUTE BEST stuff that can replace Alex,grokking for me. I was ALWAYS looking for how to connect the functional requirements into the later high level design/ deep dives but both Alex, Grok fail many times in connecting the dots.
    Subscribed and a big fan of you. I will consider purchasing coaching or mocks once I am through your videos and feel confident.

  • @cavekancho
    @cavekancho 4 месяца назад +5

    You somehow managed to make preparing for system design interviews really fun. Massively underrated channel

  • @t.jihad96
    @t.jihad96 Месяц назад +2

    This is not just interview prep, this is some serious stuff here. Thanks a lot!

  • @AlexZ-l7f
    @AlexZ-l7f 6 месяцев назад +13

    Honestly, it is the best SD showcase I’ve ever seen. You are the best. I watched all your videos and whiteboard them myself then. Thank you!

    • @hello_interview
      @hello_interview  6 месяцев назад

      So glad you like them and very smart to try them yourself and not just blindly consume!

  • @castulo
    @castulo 2 месяца назад +4

    The content is great as always. However I found this system a bit frustrating, there is so much specific knowledge one should know to really end up with a good design for this kind of problem. I wish I don't get a system like this in an interview.

  • @stevets583
    @stevets583 5 месяцев назад +5

    Awesome walkthrough! As a junior engineer I learned a lot. Near the end you said you wanted to keep it short but I appreciate the nuances you point out for your decisions including design choices between mid and higher level candidates. Time didn't faze me at all, I watched every second!

  • @getmanfg78
    @getmanfg78 4 месяца назад +3

    You are the best at what you do, after listening to your videos I cannot now like and tolerate other system design videos, please make more content for system design

  • @HatimKhan-zj1hj
    @HatimKhan-zj1hj 6 месяцев назад +8

    Really helpful videos - especially the breakdown for different expectations at mid/senior/staff levels, common things you see from candidates, and context into the actual systems like the shard limits for events streams. I used to work on Kinesis - happy you chose it!

    • @hello_interview
      @hello_interview  6 месяцев назад

      How cool! That must’ve been fun to work on :)

  • @liviubnd
    @liviubnd 3 месяца назад +1

    Great job with creating this content to help us prep for interviews!
    Just one thing to note, you can't send a 302 redirect for POST requests, it has to be a GET request.

  • @optimisticradish9121
    @optimisticradish9121 4 месяца назад +2

    I rarely leave comments but this is BY FAR the best system design video I have seen on youtube. The thing I like most is that it differentiates from common textbook solutions that we see everywhere and you explain why certain choices were made. Thanks!

    • @hello_interview
      @hello_interview  4 месяца назад

      Thanks for commenting!! Glad you enjoyed it

  • @usamaforu1
    @usamaforu1 5 месяцев назад +1

    This video helped me ace the system design interview. The detailed explanations provided in-depth knowledge of various components, which was extremely helpful for answering follow-up questions during my interview.

  • @lil_n_co
    @lil_n_co 6 дней назад

    Really good! Listened 3 times to pick up every single detail. Thanks.

  • @vikassrivastava007
    @vikassrivastava007 20 дней назад

    Thank you so much for these videos! They’re absolute goldmines-I’m genuinely amazed at the depth and clarity they offer. I’ve learned more from these than from many of the books I’ve read. Truly invaluable!

  • @zuowang5185
    @zuowang5185 6 месяцев назад +4

    These interview preps make you feel like if you know enough of system design knowledge, have good cross team examples for bq, and can solve leetcode medium-hard fast, you can get to higher level quicker than going through internal promotions.

  • @filiptepes-onea9824
    @filiptepes-onea9824 6 месяцев назад +4

    One of the best channels on system design! Please keep going!

  • @ahnaf_chowdhury
    @ahnaf_chowdhury 6 месяцев назад +6

    Ah, nice, you re-uploaded! Thanks a lot for taking the feedback and acting quickly on this. And, sorry if it caused inconvenience for you 😄Thanks a lot for all of your hard work. 🙏

    • @hello_interview
      @hello_interview  6 месяцев назад

      Thanks so much for calling that out! Glad to get it fixed within the first day :)

    • @durrthock
      @durrthock 6 месяцев назад

      Is e-commerce (design amazon / ebay) not as common as it once was?

  • @davidoh0905
    @davidoh0905 5 месяцев назад +1

    For hot shard problem in Kafka, you can salt things but in Flink, we will no longer have all the events aggregated in one Flink task. In the case where we are sinking to Redshift, we could have aggregate it there. but if we want to access it in stream, maybe we need a secondary stream that aggregates everything?
    So that added salt needs to be handled one way or the other

  • @mullachv
    @mullachv 6 месяцев назад +1

    Thank you for a great video.
    For a senior candidate it will be helpful, in my opinion, to narrate the data structures that underpin these solutions in addition to the supporting vendor products/technologies. In that, for fast aggregation of counters, one could demonstrate the use of fast but slightly imprecise counters using a count-min-sketch-like data structure, and for a slower but more accurate counter the use of a Map Reduce jobs. Aggregates and statistics over varying windows are almost a necessity for contemporary Monitoring, Analytics and ML Systems. And in such cases retaining data in-memory backed by persistent storage in the form of tree data structures keyed by aggregation windows are useful for range queries at varying granularities. For e.g.: root window [0-100). Immediate child node windows [0-50), [50-100) etc.
    It could be helpful to talk about idempotency within queue consumers. And also out-of-sequence arrival of events in the queue (handled through watermarking)

    • @hello_interview
      @hello_interview  6 месяцев назад +1

      Can have some future videos which go deeper on probabilistic data structures or other more foundational topics.

  • @prahaladvenkat
    @prahaladvenkat 3 месяца назад +1

    Excellent, as usual! Thanks so much 🙏 While concluding, you mentioned you want to keep the videos short. Please don't reduce the length. 1 hour is a sweet spot and it's necessary to capture all the important "juicy" tidbits and details you highlight. Please keep it coming 🙌

    • @prahaladvenkat
      @prahaladvenkat 3 месяца назад

      If you HAVE to reduce something, please reduce the time between videos to 1 week 😛
      No, seriously, thanks so much.

    • @hello_interview
      @hello_interview  3 месяца назад

      Haha trying 😝

  • @schan263
    @schan263 4 месяца назад +2

    I discovered your channel a few days and love all the videos so far. I love the solution enforce idempotent click tracking. There are a lot of SD videos but only your SD videos provide guidelines on the expectations based on candidates' levels. So far, I watch one video per day so I will run out of videos to watch very soon xD

  • @smokebomba
    @smokebomba 4 месяца назад +2

    I felt this was much better than the Alex Xu System Design Vol 2 on the same topic. Great Job1

  • @hazemabdelalim5432
    @hazemabdelalim5432 6 месяцев назад +2

    you are honestly the best content on system design , can you do some playlist on the system design topics themselves ?
    i mean a video where you discuss replications in depth , concurrency , etc.

  • @SagarMusale8
    @SagarMusale8 3 месяца назад

    This is the best system design video I have seen on youtube till now. Really loved the in depth discussion. Would love to see more videos. 👍

  • @bjugdbjk
    @bjugdbjk 22 дня назад

    need more like this man!
    Amazing explanation skill you have, OMG.

  • @vikaskumarsherawat
    @vikaskumarsherawat 6 месяцев назад +3

    Thanks a lot for uploading these videos. They are very informative. Keep doing the good work.

  • @vsejpal13
    @vsejpal13 5 месяцев назад +1

    This was such a pleasure to watch. Thank You. I would love to see a video on a metrics monitoring system. There will be some common components with ad-click aggregators.

  • @AmanKumar-hr5dc
    @AmanKumar-hr5dc Месяц назад

    Amazing, really better than other stuff I found on internet!
    Kudos to you!

  • @ntopno1
    @ntopno1 3 месяца назад +1

    This is great content. However, I would like to point out that the Lambda architecture includes both batch and speed layers, which process historical and real-time data in parallel. It’s not solely reliant on batch processing.

  • @pengpengjulian
    @pengpengjulian Месяц назад

    Thanks a lot ! This video is super helpful. It not only helped me understand the key components of ad click aggregator, but more importantly it taught me what does the interviewer expect for different level SDEs. One question --- do we need to dive into the aggregation logic details in Flink?

  • @bigphatkdawg
    @bigphatkdawg 5 месяцев назад +6

    The final solution _is_ literally lambda architecture.

  • @JohnCF
    @JohnCF 3 месяца назад +1

    Great video! I learnt a lot! One question I have is regarding the hot shard handling. When the click processor detects there is a hot shard and decides to change the key from AdId to AdId:n, how would it let Flink know that it now needs to change the aggregation logic (and sharding logic) for that particular AdId? (I believe this would also have a race condition when it changes within a minute window, but any data integrity issue that arise from it should get resolved by the batch job)

  • @bigodines
    @bigodines Месяц назад

    Stellar video. Only suggestion for the next ones: your drawing tool seem to have keyboard shortcuts for those diagrams and other options on the toolbar. It'll greatly improve your quality of life! Keep it up!!

  • @AnkushPuri-ml4vs
    @AnkushPuri-ml4vs Месяц назад

    Awesome content!! I was hoping to get more clarity on how same flink node determines the partitions it need to consume from in case of hot shard issue which we are effectively handling by adding a number b/w 0-n to the partition key which leads to same adId clicks published to multiple partitions in the stream.

  • @candyfloss0921
    @candyfloss0921 2 месяца назад

    these are so good , such deep dive and so clear ! Thanks because they cover so many different aspects . i am looking forward to many more videos . I am currently preparing for interviews and these are so helpful ..

  • @ebadul1702
    @ebadul1702 2 месяца назад

    Very useful video and its best among others. I got this same question twice in my loop interview.very happy how I answered

  • @radityagumay
    @radityagumay Месяц назад

    Thank you so much for the explanation. However I more like you write the functional and non functional requirements instead of paste from the clipboard. The main reason is that it's make me thinking about what should be the requirements. It's feels more like code pairing

  • @komalseelam7989
    @komalseelam7989 3 месяца назад

    Thanks for the content; It's great; One query on
    1. As we compute 10sec and write it to OLAP DBs ; The deep dive on how the user queries for 1min window, 1hr window, may be 1 day and all time window would be great info;
    2. And what could be that OLAP database choice would be and what factors to consider.
    3. Another aspect is; Freshness of the data; What does each component in the system contributes to the latency to make the event available for aggregates;
    Other aspects are great; thanks

  • @adityaagarwal5348
    @adityaagarwal5348 Месяц назад

    Thanks for the video, it is really in-depth and informative. You covered the flink + streaming part really well and why not to use checkpointing was really a good point. Saw some videos in the past that mentioned let's do checkpointing and never explained why it will work or not work.
    For the streaming components both streams (kinesis or kafka) and stream processor (Flink/kafka-streams) I got following questions ( (I was asked similar questions in an interview.)
    1. we have said that we will partition the shards or streams using adId but we have 10M ads at any given point of time. In this case, if I consider other things like replicas in kafka topic or even kinesis shards, don't we have to create lots of shards?
    2. The max traffic is 10k cps so most of the ads are not clicked and won't have active traffic so most of the shards will be empty, in this case what should be the approach?
    3. If we group some ads based on let's say advertiserId than we introduce the noisy neighbour problem where one ad generates lots of traffic and blocks the other ads.

    • @totsubo2000
      @totsubo2000 18 дней назад

      Those questions are great and definitely come up often with streaming setups. I'm no expert but ...
      Partitioning with 10M Ads ... Yeah, if we just went with adId for partitioning, it would mean loads of shards or partitions, which isn’t practical. Instead, you can use consistent hashing or modulo partitioning to map multiple adIds to a smaller, manageable number of partitions.

  • @Guimo74
    @Guimo74 4 месяца назад

    I like your videos, I have learned a lot.
    A couple comments on this video:
    a. I think the system would benefit from a Redis in the click processor service, not the idempotency lock but a redirectUrl cache {adId: redirectUrl} to reduce reads in the Ad DB. It might be a MRU cache to avoid overloading the Redis.
    b. I'm not sure why you are pushing Kinesis so hard in this solution, I mean yes I learned something about Kinesis, but it would be more practical just to place a Kafka that can handle the load peaks and has event history as well so it is possible to write the reconciliation procedures from it.
    c. I learned about Flink, thanks. I used a redis aggregator in my own solution.
    Thank you so much for your work!

  • @hbhavsi
    @hbhavsi 19 дней назад

    Hey Evan, your videos have been the best, seriously! The only suggestion I have is if you could use a dedicated mic that would be wonderful. The volume is too low even on max volume on my earphones.

    • @hello_interview
      @hello_interview  19 дней назад +1

      Updates in latest video! Have a nice mix now :)

    • @hbhavsi
      @hbhavsi 19 дней назад

      @hello_interview yay 😀

  • @srinivasanrengarajan925
    @srinivasanrengarajan925 4 месяца назад

    Beautiful Design and Amazing explanation - just impressed with the elegance of the design and the beauty of software engineering.

  • @surojitsantra7627
    @surojitsantra7627 5 месяцев назад

    Looking for your next videos. Pls upload more design problems. It almost 1month you have not uploaded. Love your content.

    • @hello_interview
      @hello_interview  5 месяцев назад +1

      Sorry, was traveling. Recording a video today! Up by EOW

  • @zeningc
    @zeningc Месяц назад

    Thank you for such a fantastic video! I have a quick question regarding the deduplication process. When using Redis to deduplicate based on impression IDs, would the entire operation of "check Redis -> populate Redis -> submit click to event stream" be atomic?
    If it's not atomic, there could be cases where Redis is updated after a click arrives, but before the click is submitted to the event stream, and if the server crashes, this could cause an issue.
    Even if we change the order to "check Redis -> submit click to event stream -> populate Redis," there's still a chance that two impressions could arrive at the same time, find no record in Redis, and both submit the same click to the event stream.
    Could you please clarify how this is typically handled? Thank you!

  • @romilgoyal5349
    @romilgoyal5349 5 месяцев назад +1

    Question: For the sharding while processing the events through Kinesis, the adId was suggested as the sharding key. This doesn't look like the best approach. At scale, millions of ads are being run on the platform and a good share of them have high enough volume. Going by the presented logic, the number of shards would explode. What do you think about this?

  • @benhall4274
    @benhall4274 6 месяцев назад +1

    Love these! And can't recommend the Hello Interview mock interviews enough!

  • @nitin50056
    @nitin50056 4 месяца назад

    You are a legend man. Make some more videos which are mentioned on your websites. Search, E-commerce , Hotel Booking system etc.

  • @jk26643
    @jk26643 5 месяцев назад

    Thanks so much for doing this! Greatly appreciated! By far the best system design videos I've seen.

  • @goyalpankaj237
    @goyalpankaj237 2 месяца назад +1

    Hi Evan, Absolutely gold content. I have one doubt here.
    For a really hot ad, you are adding some random no (1-n) to build the partition key before adding it to the kinesis stream. Now this particular ad can land into multiple spark consumers. How the different spark consumers will aggregate this data for this ad. Is there anything that i am missing?
    Are you referring to keyBy(adId) in Flink?

  • @AnyoneCanCode1
    @AnyoneCanCode1 5 месяцев назад

    Hey, I love these videos. I only used your videos and designing data intensive applications and that was enough for an E4 offer at Meta, I love the advice you give and common pitfalls you provide.

  • @FrequencyModulator
    @FrequencyModulator 2 месяца назад

    Amazing system design. I've been searching for something exactly like that, which is interview driven, not "let me show you all the ways you can do it" driven.
    May I just make a small suggestion: please use "etcetera", not "eccetera"...

  • @anonymous-eng
    @anonymous-eng 2 месяца назад

    Few questions:
    - Even in spark solution, how would you know the keys of which one to aggregate? Either you have to emit keys of which has changed or scan the db by time and get keys which is again costly.
    - Aren't this falls under lambda architecture as we are using both realtime stream processing and batch processing to ensure data integrity?

  • @SujeetBanerjee-b9g
    @SujeetBanerjee-b9g 11 дней назад

    Question: Why do we need the reconciliation mechanism? And why use a batch processing for the purpose? Do we know/assume stream processing would accumulate errors compared to batch processing (the latter being accurate?)?

  • @CS2dAVE
    @CS2dAVE 5 месяцев назад +4

    Amazing content! Very much appreciate you posting these 🙌
    System design padawan here. I have a question about the hybrid approach .. what makes us trust the "Kinesis -> Connector -> S3 -> Spark -> Worker -> OLAP" results more than the "Kinesis -> Flink -> OLAP" results? Is it a guarantee where the connector always successfully writes the data to S3? or does Flink make some kind of tradeoff for speed? kind of confused about that piece and figured i'd ask. thanks again!

    • @mehdisaffar
      @mehdisaffar 5 месяцев назад

      I am also curious about this

    • @shiweist
      @shiweist 3 месяца назад +1

      +1 on this question.
      IMO, Spark is useful when you have really out-of-order events, like events arriving half an hour late or something. Then, by using Spark, you can reorder the events and get a more accurate count. On the other hand, for events that are only a few minutes late, you can configure Flink with the allowed lateness of a few minutes.
      That being said, the cost of maintaining 2 code bases and ensuring that they are updated at the same time (to avoid triggering discrepancy alerts) doesn't seem worth it for such edge cases.
      I'd be interested to hear @hello_interview's thoughts on this though.

    • @JustLearningIn2024
      @JustLearningIn2024 Месяц назад

      > Is it a guarantee where the connector always successfully writes the data to S3?
      Yes. That is something provided by AWS as a managed service, and it should meet their SLAs. AWS would've created fallbacks and fault tolerance to ensure that all events that are in Kinesis reach S3.
      I don't see there being any compromise due to speed. Kinesis has retention policy, so the data isn't going anywhere, and S3 is highly available, so the data shall be written there as well.

  • @raxcoins
    @raxcoins Месяц назад

    this one had a diff approach i dint see b4. nice design.

  • @lalop2200
    @lalop2200 5 месяцев назад

    I love this channel. Very good job sir, your strategy is really good a comprehensive. Straight to the main points. Bravo

  • @hbhavsi
    @hbhavsi 8 дней назад

    Great video, covers so many new topics. Is the use of a time-series database practical for storing click events by timestamp? By design, that would help with aggregation in 1 minute windows, no?

  • @implemented2
    @implemented2 3 месяца назад +2

    Why this is not lambda architecture? It has both realtime and batch processing, so what is the difference?
    Thank you, btw

  • @tomertuchner6907
    @tomertuchner6907 2 месяца назад

    We initially said that we want to perform complex queries. In addition to time range, we want to check who were the users, and maybe where the clicks were from, etc. So that means we need more types of aggregations, for example by user id, by location, etc. How do we handle that? What if we get a query that we didn't prepare an aggregation for in advance?

  • @LUKEMELIKIAN
    @LUKEMELIKIAN 6 месяцев назад +1

    Thanks for the detailed explanation! Definitely learned some new things in this video.

  • @flyingpiggy741
    @flyingpiggy741 3 месяца назад +2

    The final design has both real time data processing and batched processing. Why is it not lambda architecture?

  • @go_goa_gone_
    @go_goa_gone_ 28 дней назад

    Hi Evan, Thanks for the great video. I have a query. Can we use time series database here?

  • @nelsonn5123
    @nelsonn5123 5 месяцев назад

    I think bloom filter would be a good choice to check on duplicate impression id. I think, it is also supported by redis.

  • @michaelgreco2326
    @michaelgreco2326 Месяц назад

    Love the content! Watched so many videos and they have really helped me in interviews.
    I had one questions. Instead of dumbing data from Kinesis to S3 to be read by spark. Why not just have spark batch processing read right off of Kinesis? If you are doing reconciliation every hour, day, or whatever. If is is smaller than the retention policy on Kinesis, I thought you could just do it from there. What am I missing?

  • @stong4320
    @stong4320 2 месяца назад

    I know you called out the issue of contention as a reason for having two db in the beginning.
    What makes the OLAP db different so that we don't need to worry about that for read and write queries?

  • @flyingpiggy741
    @flyingpiggy741 3 месяца назад

    I believe the checkpoint is still necessary so it avoids data loss. If the server crashed, the checkpoint stores what the offset in kafka/kinesis stream is at and restart from the offset in the checkpoint.
    Without the checkpoint, flink has no idea where it should be restart from and the data will be lost between the last time it send data to the OLAP and the the it crashed.

  • @gauravaws20
    @gauravaws20 6 месяцев назад

    absolutely brilliant content mate. keep em coming. only channel for which I have a notification on.

  • @fayezabusharkh3987
    @fayezabusharkh3987 6 месяцев назад +1

    For Kinesis hot shards, we don't know if an ad is hot beforehand. So are these ad_id 0-N always active? Is it ok to use x10 the amount of streams we need under normal circumstances?
    For Flask, we have the same amount of flask servers as the Kinesis shards right? If the server dies, how will the new server keep track of the pointer from the old server? Are they statefull backups instead of stateless

    • @hello_interview
      @hello_interview  6 месяцев назад +1

      This is a great question. In reality you can make predictions here. We know based on budget and historical performance which ads we’d need to be worried about before hand

  • @VyasaVaniGranth
    @VyasaVaniGranth 4 месяца назад +2

    Thank you for the video! Isn't this exactly what Lambda architecture is and not a "hybrid between lambda and kappa"?

  • @rahulshrivastava3040
    @rahulshrivastava3040 2 месяца назад

    Simply the best resource !!!!

  • @shiweist
    @shiweist 3 месяца назад

    Thank you for sharing!
    I got a question about the decision to not use checkpointing in Flink. If you don’t enable that then where would you store the Kafka consumer offsets for recovering?

  • @viniciusrolandcrisci272
    @viniciusrolandcrisci272 6 месяцев назад

    I saw some videos and your content is so great. Thank you so much for clarifying the SQL vs NoSQL debate. I always thought that bringing that into an interview was irrelevant but was afraid to do it. 😅
    Keep up the amazing work.

    • @hello_interview
      @hello_interview  6 месяцев назад +1

      Yah funny how that was evangelized in a couple books and then just stuck

  • @Marcus-yc3ib
    @Marcus-yc3ib Месяц назад

    This is a very high quality video.

  • @go4knk
    @go4knk 2 месяца назад

    This is awesome. Thanks Evan. I have a question on the usage of blob storage. Aren't those supposed to be used for storing unstructured data like images, audio & video files? Could you please elaborate on 1) how Spark task reads data from S3 2) how Spark job would sustain reading one day's data? Is checkpointing used in this context?

  • @leizhao2106
    @leizhao2106 2 месяца назад

    Can I use this aggregator flow for designing the top-K RUclips videos system? What are the major differences except ranking?

  • @Andrew-pj9ik
    @Andrew-pj9ik 5 месяцев назад

    Thanks for the great videos - they are extremely helpful.
    I noticed at around 24 mins in you mention querying for the number of distinct userIDs. I don't think you're going to be able to serve queries like that using the pre-aggregation you suggest doing with Flink. I don't know a good solution to this problem other than dumping the list of userIDs for each minute window into your OLAP DB. You might be able to use HLL hashes for this, but depending on how granular the dimensions are in your DB, it may not be worth it..
    I think it's at least worth mentioning this if we think users care about unique counts.

  • @chengchen8028
    @chengchen8028 5 месяцев назад

    Incredible video with excellent drawing and explanation.

  • @dp8jl
    @dp8jl 15 дней назад

    Why did we not use a Redis instead of using Flink? Redis is also and in memory structure, that will meet our write throughput demand and we should scale it by sharding on Ad id?

  • @SauceRawr
    @SauceRawr 4 месяца назад

    Hi this was super helpful! My question is how would you handle the offline channels case? i.e. how would you aggregate data for one ad shown across multiple channels? I feel like the design wouldn't have to change that much because the adId could just remain the same and you can just add a "channel" metadata field for where it was shown.

  • @ravisr4561
    @ravisr4561 5 месяцев назад +1

    Hi Great explanation for a complex topic in such a easy way.Is Once only processing also critical when we are passing messages from kafka to flink.If we want one to enable once only processing on flink then checkpointing will be required juts a though

    • @hello_interview
      @hello_interview  4 месяца назад

      You can set it per message! From the docs, “Every Amazon SQS queue has the default visibility timeout setting of 30 seconds. You can change this setting for the entire queue. Typically, you should set the visibility timeout to the maximum time that it takes your application to process and delete a message from the queue. When receiving messages, you can also set a special visibility timeout for the returned messages without changing the overall queue timeout.”

  • @Neil-ph7rf
    @Neil-ph7rf 5 месяцев назад

    when will you post the next interview video? waiting for it about 1 month!!! really appreciate the effort.

  • @zayankhan3223
    @zayankhan3223 5 месяцев назад

    This is another great video!! Please keep it coming. Can we use mirroring in Kafka and have spark read from the mirror and provide data to reconciliation service?

    • @hello_interview
      @hello_interview  4 месяца назад

      you know i have less familiarity there. potentially, but not totally sure.

  • @deathbombs
    @deathbombs 6 месяцев назад

    21:48 I like how DB can be used for simplest case consistently in these approaches

  • @sparrow2068
    @sparrow2068 Месяц назад

    Why do we use nosql for the write heavy db? Since the data is very structured and you might want complex queries…

  • @priyanshubajpai6925
    @priyanshubajpai6925 Месяц назад

    Why do we have to rely on Kinesis retention policy, when Flink ensures fault tolerance using check-pointing?

  • @deathbombs
    @deathbombs 6 месяцев назад

    I rewatched and had some new thoughts. Wonder what are the costs of using streaming solution? I seems like the database for clicks that was used in batching solution is completely replaced by the streaming components, so benefits from having the previous database queries are lost?
    34:52 streaming solution real time is by dumping to OLAP?

  • @tunepa4418
    @tunepa4418 5 месяцев назад

    Please can you clarify this? You mentioned the count query on cassandra will be really slow. Would it really be slow? If the partition key is ad_id and the sort key is timestamp. I assume all the data for the same id will be on the same partition sorted by timestamp. Why would it be slow?

  • @happybaniya
    @happybaniya 3 месяца назад

    The best The best.. Loved it. Thanks for doing this. ❤

  • @Global_nomad_diaries
    @Global_nomad_diaries 6 месяцев назад

    The best system design content.
    Thanks alot for helping me to prepare for my upcoming interview s.
    Can you please clarify the difference between product design and system design at Meta?

    • @hello_interview
      @hello_interview  6 месяцев назад

      www.hellointerview.com/blog/meta-system-vs-product-design :)

  • @lloydlasrado
    @lloydlasrado 20 часов назад

    How can you identify if interviewer is asking Product vs Infrastructure system design question?

  • @flyingpiggy741
    @flyingpiggy741 3 месяца назад

    When we do the idempotency, could we save the last time we see the ads in the redis for the adId and every later time, it will compare the current ads request to see if it has been a few days? So it knows that it should be a different impression id? impression id 1 and impression id 2 will be 3 days apart. Is it valid?

  • @jiananstrackjourney370
    @jiananstrackjourney370 2 месяца назад +1

    If we use Cassandra with adId as primary key and timeStamp as the sort key, will the read be fast enough?

  • @yarik2303
    @yarik2303 6 месяцев назад

    hi, I may missed this: is it possible to put Apache Kafka + ksqlDB to build aggregations with Materialized Windowed Tables, where you can also use flash interval? Is it acceptable for such interview?

  • @96jugal
    @96jugal 5 месяцев назад

    Love the content! Thank you for making these!

  • @AliakseiPialetski
    @AliakseiPialetski Месяц назад

    I am learning so much, my god

  • @aspiring1460
    @aspiring1460 6 месяцев назад +1

    I honestly feel you should hire @Jordan Has No Life as a system design expert on your channel. The depth of system design in his videos his quite good and honestly it makes up for a senior engineer. As what's the case with Staff SWE Expectations well that depends honestly on the individual. I think It can only come from experience or reading books such as Database Internals and/or DDIA. No amount of videos can make up for the Staff SWE expectations in System Design.

    • @hello_interview
      @hello_interview  6 месяцев назад +2

      We love Jordan ♥️

    • @aspiring1460
      @aspiring1460 6 месяцев назад

      @@hello_interview Me Too!! That guy's an OG in System Design.