Scaling Monolithic Applications

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • How do you scale a monolith? Scale up? Scale out? Scaling Monolithic Applications with well defined boundaries that are loosely coupled, you have a lot of options. You can scale out each boundary independently, including the database. Boundaries within a system are so important, regardless of Monolith or (Micro)Services.
    🔔 Subscribe: / @codeopinion
    💥 Join this channel to get access to source code & demos!
    / @codeopinion
    🔥 Don't have the JOIN button? Support me on Patreon!
    / codeopinion
    📝 Blog: codeopinion.com/scaling-a-mon...
    👋 Twitter: / codeopinion
    ✨ LinkedIn: / dcomartin
    0:00 Intro
    0:20 Loosely Coupled Monolith
    2:26 Web Application Scale Out
    5:13 Database Scaling
    6:17 Message Processing Scale Out
    7:38 Independent Deployment
    #softwarearchitecture #scaling #monolitharchitecture
  • Věda a technologie

Komentáře • 29

  • @CodeOpinion
    @CodeOpinion  Před 3 lety +1

    How are you scaling our monolith? What part of your application is the bottleneck?

  • @steveofficer9255
    @steveofficer9255 Před 3 lety +2

    It's really refreshing to see developers out there cutting through the buzzwords of monolith = bad, microservices = good.
    There is so much misinformation out there, and it's scary the amount of people who still believe that monoliths cannot be scaled out.
    The focus should have always been on loosely coupled components. Whether things live in 1 process or multiple processes is a useful side-effect of the loose coupling. But the focus should always be on the autonomous, loosely coupled components.

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +1

      Ya, as I've described in other videos, it's about logical decoupling. But everyone got on the train of logical = physical, when it doesn't have to be.

  • @coderanger75
    @coderanger75 Před 3 lety

    Another great video! Thank you!

  • @vimalneha
    @vimalneha Před 3 lety

    It was useful in understanding the concept.
    I am into the DDD world, this presentation added to a much clearer understanding. Thanks Dereck!!

  • @kenneho
    @kenneho Před rokem

    Thanks for these excellent videos.

  • @666santilmo
    @666santilmo Před 3 lety

    excited when your next video will be published!

  • @aivarasatkocaitis4356
    @aivarasatkocaitis4356 Před 3 lety

    I like that you show how your visuals look in code. Project separation in this case.

    • @CodeOpinion
      @CodeOpinion  Před 3 lety

      I likely will do another video on project separation. Most folks seem to simply use projects for technical layered (horizontal) separation, which I think is a bit off point.

  • @qizhang5749
    @qizhang5749 Před 3 lety

    Another banger of a video! Do you have any videos on how to carve out these contexts from an existing monolithic app?

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +1

      Not yet, but that's coming up for sure.

  • @aliroshan89
    @aliroshan89 Před 3 lety

    There are few resources that talk about scaling the monoliths. Thanks for the excellent video. We are currently planning to run multiple instances of our main service and this will help a lot.

  • @jameshickey84
    @jameshickey84 Před 3 lety

    Awesome topic to cover. It really highlights the power of getting your boundaries correct (or as close to "correct" as possible lol) The 4+1 model def comes to mind here

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +2

      James, you just gave me another topic: 4+1. Thank you sir!

    • @saurabhchauhan232
      @saurabhchauhan232 Před 3 lety

      @@CodeOpinion Context is king 😀

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +1

      Yup, I touch on it in that talk (if that's what you're referring to!).

  • @peymannaji
    @peymannaji Před 3 lety +1

    Thanks for the video.
    I have a question regarding scaling out a service which subscribes to a message broker and a specific "Queue".
    Let's say there is a service "A" and After scaling out the service "A", I would have 3 instances. (A1, A2, A3)
    All 3 instances are subscribing to a specific queue (Queue-A) . What would happen if we publish
    a message to that specific queue (Queue-A) which has 3 subscribers (A1-A2-A3)? Do they all receive and process the same message?

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +1

      Check out this video on Competing Consumers, it might be what you're looking for to answer this question: czcams.com/video/xv6Ljbq6me8/video.html

    • @peymannaji
      @peymannaji Před 3 lety

      @@CodeOpinion Thanks mate!

  • @sailleshpawar3036
    @sailleshpawar3036 Před 3 lety

    Derek just out of curiosity, my question might be dump.
    But I got bit confused how you are calling the bounded context from loader balancer.
    As you mentioned 1st server is is using C1, second server c1 and 3rd c2, c3, c4 .
    How we can achieve it.
    Can you the please create one video with live demo of it and can you also share the code repository link.
    Thanks

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +2

      So ultimately each instance has all the code. It has all the contexts (c1,c2..) within it. However with load balancing rules, you would specify your load balancer to only send certain requests to specific instances. Example would be if a request goes to "/api/sales/*" the load balancer would route that request to server1. Meaning server 1 would only be handling requests for the sales boundary. Server 1 still has the code for other boundaries, but it's pretty much just dead code since it won't execute. Hope that helps clarify a bit.

    • @sailleshpawar3036
      @sailleshpawar3036 Před 3 lety

      @@CodeOpinion Thanks Derek now everything is crystal clear. 👌👏👍 Learned something new

  • @JeffChentingwei628
    @JeffChentingwei628 Před 3 lety

    I wonder how to deal requests in terminating instances.

    • @CodeOpinion
      @CodeOpinion  Před 3 lety +1

      Terminating? Do you mean while deploying a new version? Most load balancers will terminate connections after a timeout when they draining connections to be removed from the pool. However, connections shouldn't really ever last that long. The deployment process generally is, remove a server/app from the load balancing pool, which will not get any new requests/connections and then wait till existing connections disconnect/complete.

    • @JeffChentingwei628
      @JeffChentingwei628 Před 3 lety

      @@CodeOpinion Thank you!Actually, I am dealing with EC2 auto scaling. So, I understand what you pointed out!I will also find out the further information of "graceful shutdown" in iis.