Data Consistency in Microservices Architecture (Grygoriy Gonchar)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

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

  • @mehrdadk.6816
    @mehrdadk.6816 ปีที่แล้ว +8

    Approaches for dealing with data inconsistency
    1. saga
    2. reconcilation
    3. application event log
    4. 2PC/XA
    5. event first

  • @arisskarpetis
    @arisskarpetis 5 ปีที่แล้ว +12

    Moving functions that require data consistency in the same Microservice was great information.

  • @amanbains5474
    @amanbains5474 4 ปีที่แล้ว +14

    Why didn’t they ask any event failure type rollback questions in microservices !! This is a really great presentation !!Too much content here in approx 30 minutes !! I have gone through this 5 times !!! Excellent stufff !!

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

      Thanks for your warm feedback! And sorry for making it that concise, that's not just you who shared that.

    • @mehrdadk.6816
      @mehrdadk.6816 ปีที่แล้ว

      In germany people tend to be quite. stupid developers who don't listen and yet make a mistake and leave the company

    • @theaungmyatmoe
      @theaungmyatmoe 6 หลายเดือนก่อน

      You can accomplish rollback with compensation

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

    Wow, this is such an amazing speech. Thanks a lot for sharing your wisdom 👍👍
    23:36 here is the summary of the lecture but it would not be so easy if you haven’t followed the whole journey

  • @PointlessMuffin
    @PointlessMuffin 5 ปีที่แล้ว +19

    Data consistency is number one priority ;)

    • @VarunKalia26
      @VarunKalia26 4 ปีที่แล้ว +3

      Haha I see what you did there ;)

  • @Joseph-oz7tx
    @Joseph-oz7tx 9 หลายเดือนก่อน

    Thanks, Grygoriy, that's a great speech

  • @talgatsabyrov9957
    @talgatsabyrov9957 3 ปีที่แล้ว +8

    Эх, наших всегда можно распознать по акценту :)
    Классное видео, большое спасибо :)

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

      говорит на русском, английскими словами)

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

      НАУ може пишатися такими випускниками як він

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

    there isn't a fully exact way you can achieve complete data consistency with micro-service without a level of decoupling trust me. using some kind of locking mechanism and consumer acknowledgement could help to some extent though. for example, use ACID features to lock a transaction on your service db, send and event to a queue like rabbitmq or kafka and wait for acknowledgement before persisting your data in your service before unlocking or if error occurs then unlock and report the error. this same scenario for an event listener as well

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

    the presenter is very well educated, please add his name for reference :)
    thanks for the great talk

  • @Food_Nature_Lifestyle6
    @Food_Nature_Lifestyle6 4 ปีที่แล้ว +4

    Hi Grygoriy Gonchar, thanks for the nice video on data consistency.
    I have a question : Where is the "Application Event Log" containing the order details (Request, Payment, Flight etc) stored ? I mean in which service ?
    In the example you mentioned, in "makemytrip" there are 5 services, where is the "Application Event Log" Maintained ? Is it maintained by a separate microservice (SAGA) or in one of the 5 microservices (Order, Payment, Hotel, Flight, Transfer) ?

  • @TV-lv4mf
    @TV-lv4mf 2 ปีที่แล้ว

    Great sharing video and thank for tutorial friend, nice meet you ~~^^ ^^

  • @VarunKalia26
    @VarunKalia26 4 ปีที่แล้ว +3

    I wonder if anyone if the audience was even listening to this guy? How come you cannot have a question about this topic?

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

      The audience asked many questions afterward in person :)

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

    Thanks so much for this tutorial.

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

    Awesome presentation. No questions from the audience, made me surprise!
    Anyway, He mention in Kafka vs RabbitMQ, with Kafka there are no retries out of the box. How come that happen?

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

      In Kafka, there is no easy way to retry processing a specific message without stop moving the cursor and blocking the whole partition processing. Sure you can retry processing a message easily by not moving the cursor forward, but that would delay processing the next messages in that partition. In contrast in message brokers like RabbitMQ you can do that.

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

      What he said ^ I'll just add that different use cases have different requirements for strict ordering of event processing. In some applications, it is critical that the next message not be processed until after the current message has been processed, and hence the cursor should not be allowed to move and the whole partition's queue blocked until the issue is resolved. In other use cases, one or two retries can be attempted and then the failure recorded and the processing allowed to move on past the failed message. And in some use cases, a given event should only be processed one time and the queue continues, regardless of whether it succeeded or failed.
      All of these approaches are easily achieved using Kafka's offset counter / cursor. But the developer needs to make a conscious decision about which approach is appropriate for a their use case.

  • @AjayKumar-fd9mv
    @AjayKumar-fd9mv 4 ปีที่แล้ว +1

    Thanks for this great talk

  • @AmanNidhi
    @AmanNidhi 5 ปีที่แล้ว +5

    nice presentation

    • @dfhwze
      @dfhwze 4 ปีที่แล้ว

      Yeah but bad audience. There is a sea of questions sailed by!

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

    @18:21, how will the "orders" event cancelled if payments did not go thru or vice-versa. In other words what happens if number 4 errors out in one of the 2 places

    • @grygoriygonchar6994
      @grygoriygonchar6994 4 ปีที่แล้ว

      It would be a payment service responsibility to publish an event into Orders steam/topic to inform other services that event is canceled OR it would be an order service responsibility to monitor some Payments steam/topic to detect failed payment and cancel the order. Depending on where do you want to have this complexity and if you want payments service know a bit about orders or orders to know about the payment. Looks like payments already know about orders so 1st scenario looks slightly better to me

    • @nishanth2884
      @nishanth2884 4 ปีที่แล้ว

      @@grygoriygonchar6994 Isn't that similar to a compensating transaction in the saga pattern except that this is event driven ?

    • @rdean150
      @rdean150 3 ปีที่แล้ว

      Or the Order event processor only responds to Payment Succeeded events in the first place.
      Or possibly it responds to the same Order Initiated event that triggers the Payment processor by creating/storing an Order in a pending / incomplete state. When it encounters a Payment Succeeded event, the Order event processor will load the pending order and advance it to an actionable state and possibly publish a new event that will signal a different processor to act upon. If the Order event processor receives a Payment Failed event, it will load the pending order and update it to a rejected state.
      This does introduce a potential race condition, however, that an Order event processor could encounter a Payment Succeeded event before one of its sibling processors has successfully finished processing the Order Initiated event, and hence there is no pending order for it to load and update. So I think the first approach may be the better one. But the downside of only responding to Payment Succeeded events is that if the payment failed, there will be no record of the Order existing at all, other than in the event log itself.

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

    Does it affect system performance?

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

      usually consistency and availability are a compromise , so in a way yes ... more consistency is less

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

    good content but poorly presented

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

    Need more examples

  • @yoloswaggins2161
    @yoloswaggins2161 5 ปีที่แล้ว +3

    paid*

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

    21:15 deal with incositency

  • @sameersarmah1446
    @sameersarmah1446 5 ปีที่แล้ว +6

    Too much content in too little time

    • @gaatutube
      @gaatutube 4 ปีที่แล้ว

      I agree ... and some of the patterns were not clear segregated. For example, he talked about reconciliation first ... but later seemed to talk about CQRS etc (stuff in the SAGA pattern). Is reconciliation part of the saga pattern or is it a different pattern altogether? Was confused on this.

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

    Спасибо, коротко, по делу, понятным английским. А на русском есть то же самое или похожее?

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

      Из моих докладов, к сожалению, нет

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

      @@grygoriygonchar6994 Спасибо. Может, есть на украинском? :)

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

      @@grygoriygonchar6994 Спасибо, текст доклада очень помоает ebaytech.berlin/data-consistency-in-microservices-architecture-bf99ba31636f

  • @sbera87
    @sbera87 8 หลายเดือนก่อน

    This is how you not do a presentation.. a slide should illustrate the idea. Too much talk

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

    difficult to understand his English. painful. sorry. Otherwise, it is good

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

    ZZZZZZZZZzzzzzzzzzzzzzzz

  • @vanmierra6927
    @vanmierra6927 3 ปีที่แล้ว

    Blockchain

  • @bahtiyarozdere9303
    @bahtiyarozdere9303 3 ปีที่แล้ว

    No code, no believe.

  • @srianshworld3942
    @srianshworld3942 3 ปีที่แล้ว

    Too much content in too little time