How we use DynamoDB streams to replicate data into Elasticsearch

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • Sharing a high level design for how dynaomdb streams work and how we used it to duplicate data over to elasticsearch
    ------------
    🤑 Patreon / webdevjunkie
    🔔 Newsletter eepurl.com/hnderP
    💬 Discord / discord
    📁. GitHub github.com/cod...

ความคิดเห็น • 21

  • @Nova-ul3vv
    @Nova-ul3vv 5 หลายเดือนก่อน +2

    Dude i feel ya! 😅 DynamoDB is nice but its hell to serve data to other applications. Especially if you have a lot of data which needs to be paginated on complex queries its simply not possible.
    We currently query all data then do further processing in lambda and put the results in memory. But your video gave me an idea how to restructure. Thx!

  • @MdRahman-ho8fl
    @MdRahman-ho8fl 4 หลายเดือนก่อน

    excellent. brief and clear.

  • @ImranKhan-xn6ig
    @ImranKhan-xn6ig ปีที่แล้ว

    Crisp and Clean Explanation

  • @uzair004
    @uzair004 3 หลายเดือนก่อน

    It would be expensive process.
    I need to know how I to improve dynamodb modeling and mapping process, it took me so much time to come up with few access patterns.

  • @renanlisboa123
    @renanlisboa123 8 หลายเดือนก่อน +1

    Why not use a SQL database? I'm not judging or anything I'm just trying to learn so I can make some decisions in my job.

    • @WebDevCody
      @WebDevCody  8 หลายเดือนก่อน +1

      i wish we did. I'm not a fan of dynamo unless you have "super large data" needs.

  • @ebukaume
    @ebukaume ปีที่แล้ว +1

    Nice design, but perhaps we could buffer the stream using an SQS (with a DLQ) so the Lambda doesn't choke and so we could recover from errors in the lambda without losing data. WDYT?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว +2

      I think the dynamodb streams (kinesis) is built to hold a LOT of messages, so I don't think it would ever choke. Also the lambda processing the streams from the dynamodb stream already have a fixed limit on how many message they can read per second, so I don't think they will ever choke per say.

    • @ImranKhan-xn6ig
      @ImranKhan-xn6ig ปีที่แล้ว

      @@WebDevCody Lambda could fail cause of other unexpected reason. Don't you think adding a SQS as buffer (with a DLQ) with ensure data processing of each event streamed from dynamoDB. Just curious can we ensure 100% processing of streams without involving Buffer SQS but including DLQ

    • @carlosmedinaio
      @carlosmedinaio 5 หลายเดือนก่อน

      I think a SQS (with DLQ) should be added for example just in case the communication between Lambda and ElasticSearch faces some unexpected issue, and the data record to be inserted is lost. Having the SQS, the message involved in the issue will go back to the SQS and event will be launched again. Am I ok?

  • @raygan3
    @raygan3 2 ปีที่แล้ว +3

    I dont know much about elastic serach but i wonder why do you need dynamodb, cant you just use elasticsearch as your database?

    • @WebDevCody
      @WebDevCody  2 ปีที่แล้ว +3

      bonsai.io/blog/why-elasticsearch-should-not-be-your-primary-data-store

  • @SeibertSwirl
    @SeibertSwirl 2 ปีที่แล้ว +1

    Good job babe!!!

  • @adriancoliba
    @adriancoliba ปีที่แล้ว

    Great, thanks!

  • @PTBKoo
    @PTBKoo 9 หลายเดือนก่อน

    Is there a service that can provide similar functionality as dynamodb streams for planetscale mysql?

  • @allenchun48
    @allenchun48 ปีที่แล้ว

    What if I update, or delete a record in dynamodb? will it also reflect in Elasticsearch?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      Yes if you handle the update or delete event in the stream, you can also remove it from elastic search.

  • @sheldonfourie5959
    @sheldonfourie5959 2 ปีที่แล้ว

    Nice🤓

  • @vaultek_
    @vaultek_ 2 ปีที่แล้ว

    Where we get that dynagrams images

    • @WebDevCody
      @WebDevCody  2 ปีที่แล้ว +1

      Which one? You’d need to take a screenshot

    • @vaultek_
      @vaultek_ 2 ปีที่แล้ว

      @@WebDevCody I find it, no worries thanks