Stateful vs Stateless Architectures Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025

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

  • @hayk.simonyan
    @hayk.simonyan  3 หลายเดือนก่อน +6

    Free System Design Course: skool.com/web-dev-mastery

  • @lovingnation3223
    @lovingnation3223 3 หลายเดือนก่อน +6

    I am in IT for over. a decade and so far no one explained concept this better yet .. Excellent job! I think some credit goes to your video editor as she/he is spot on with with your script .. keep it up.

    • @hayk.simonyan
      @hayk.simonyan  3 หลายเดือนก่อน

      Glad to hear that. Thanks from my editor as well :))

  • @lodosdurak7913
    @lodosdurak7913 3 หลายเดือนก่อน +20

    Stateless is when waiter leaves the order paper with the customer, so customer hands in the the order paper each time and updates accoridngly so the kitchen doesn't need to save the order info, its stored by the customer.

    • @adityatripathi9125
      @adityatripathi9125 3 หลายเดือนก่อน +2

      Exactly! I was thinking the same. Its clients responsibility to communicate state details with each requests.

  • @devkasunlakshitha
    @devkasunlakshitha 2 หลายเดือนก่อน

    Best explain about stateful/stateless architecture. Thank you!

  • @esmileict3972
    @esmileict3972 23 วันที่ผ่านมา

    Great Explanation!

  • @shubhambelwal674
    @shubhambelwal674 2 หลายเดือนก่อน

    loved it, you explain so good. god bless you.❤❤

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

    Your videos are awsome, thank you!

  • @Senboni
    @Senboni 3 หลายเดือนก่อน +15

    since stateless is more scalable, you can add more servers -- easy. but what about the shared instance? in this case a database, it also needs to scale? how?

    • @hayk.simonyan
      @hayk.simonyan  3 หลายเดือนก่อน +9

      Absolutely! The shared database must also scale alongside growth. That's exactly what I discussed in a previous tutorial, so be sure to check out the video on database replication and sharding on this channel.

  • @sheikhAbdelrahman
    @sheikhAbdelrahman 4 หลายเดือนก่อน +14

    I think there is a misconception here.
    Both architectures are basically Stateful. The only difference is the storage of the state on a shared media or cache (ex. Redis).

    • @hayk.simonyan
      @hayk.simonyan  3 หลายเดือนก่อน +8

      You're right that both architectures can maintain state, but the key distinction is where and how the state is stored and managed. In case of stateless the server doesn't retain session information between requests and relies on external storage, but in case of stateful they handle state directly on the server. Hope that clears it up!

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

      thank for calling out, I'm also confuse about "Stateless" here. For me, it is more like a technic or system design to scale horizontally at server level

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

      @@hayk.simonyan Server side is maintaining state on the server on both cases, it's not stateless. The "media" you store the session information on server side doesn't make it stateless. You point is about a "share storage" on server. @lodosdurak7913 gave us an example of stateless, when request need to send "all information" every time, since there is "no state" on the server (stateless)

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

    the question is
    in stateless server we need to query database for everything
    and this consume time
    while if there is array of current logged users
    and if there is like websocket also so which is better ?

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

    Now I understand. Many thanks .

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

    legend finally understood

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

    Which situation need use Statefull?

    • @hayk.simonyan
      @hayk.simonyan  3 หลายเดือนก่อน

      when you need to maintain context or state across multiple requests or interactions

  • @galleon8129
    @galleon8129 3 หลายเดือนก่อน +1

    Nice, but use real use cases from Azure or AWS. Elastic Beanstalk would be a good example

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

      I think you missed the point of the video 😂. It’s for beginners. Use your imagination.

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

    Multitenancy next.