Scaling Monolithic Applications
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
How are you scaling our monolith? What part of your application is the bottleneck?
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.
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.
Another great video! Thank you!
Glad you enjoyed it. Thanks!
It was useful in understanding the concept.
I am into the DDD world, this presentation added to a much clearer understanding. Thanks Dereck!!
Glad it helped!
Thanks for these excellent videos.
My pleasure!
excited when your next video will be published!
I like that you show how your visuals look in code. Project separation in this case.
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.
Another banger of a video! Do you have any videos on how to carve out these contexts from an existing monolithic app?
Not yet, but that's coming up for sure.
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.
Glad it was helpful!
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
James, you just gave me another topic: 4+1. Thank you sir!
@@CodeOpinion Context is king 😀
Yup, I touch on it in that talk (if that's what you're referring to!).
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?
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
@@CodeOpinion Thanks mate!
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
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.
@@CodeOpinion Thanks Derek now everything is crystal clear. 👌👏👍 Learned something new
I wonder how to deal requests in terminating instances.
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.
@@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.