Learning Library

← Back to Library

Understanding Microservices vs Monoliths

Key Points

  • A micro‑service architecture splits each function of an application into its own containerized service that communicates via APIs, unlike a monolith where all functionality lives in a single deployable unit.
  • Monolithic applications are simple to develop and deploy initially, but they create tightly coupled code, shared libraries, and language/framework lock‑in, making changes risky and hard to manage.
  • As a monolith grows—adding new features like inventory, recommendations, carts, payments, and reporting—it becomes increasingly complex for teams to understand, harder to modify, and requires large, disruptive deployments.
  • Scaling a monolith is inefficient because any high‑load component (e.g., the payment service) forces the entire application to be redeployed or scaled together, whereas micro‑services can scale individual services independently.

Full Transcript

# Understanding Microservices vs Monoliths **Source:** [https://www.youtube.com/watch?v=CdBtNQZH8a4](https://www.youtube.com/watch?v=CdBtNQZH8a4) **Duration:** 00:06:39 ## Summary - A micro‑service architecture splits each function of an application into its own containerized service that communicates via APIs, unlike a monolith where all functionality lives in a single deployable unit. - Monolithic applications are simple to develop and deploy initially, but they create tightly coupled code, shared libraries, and language/framework lock‑in, making changes risky and hard to manage. - As a monolith grows—adding new features like inventory, recommendations, carts, payments, and reporting—it becomes increasingly complex for teams to understand, harder to modify, and requires large, disruptive deployments. - Scaling a monolith is inefficient because any high‑load component (e.g., the payment service) forces the entire application to be redeployed or scaled together, whereas micro‑services can scale individual services independently. ## Sections - [00:00:00](https://www.youtube.com/watch?v=CdBtNQZH8a4&t=0s) **Microservices vs Monolithic Architecture** - The speaker explains microservice architecture as containerized, API‑driven services contrasted with traditional monolithic applications, using a ticket‑selling system example to highlight dependencies and deployment differences. ## Full Transcript
0:00hi I'm Darren Bettinger with the IBM 0:02cloud team today I'm here to enter the 0:03question what are micro-services for 0:06those who don't know a microservice is 0:08an application architecture that takes 0:10every application function and puts it 0:13in its own service that runs in a 0:16container and these containers then 0:18communicate over api's to better 0:21understand what a micro-service is we 0:23should probably look into understand 0:24what a monolith is the monolithic 0:26architecture is a server-side system 0:28based on a single application in a Java 0:30world for example the the application 0:33would be put into a jar or war file and 0:36deployed as a whole into a production 0:38environment the thing about a monolith 0:40is they're easy to develop deploy and 0:43manage but things happen over time 0:46Lesly use an example in this case 0:49pretend we are a ticketing service one 0:53that sells tickets to sporting events 0:55and concerts etc in a monolithic world 0:59the architecture might look like this 1:02where we have a user interface we have 1:06some semblance of an inventory component 1:09a recommendation engine that provides 1:13outputs based on user inputs maybe a 1:16cart service we'd have a payment service 1:20and then some type of reporting function 1:25to generate reports so that's great the 1:28thing you can realize right off the bat 1:30is that these are highly dependent 1:33systems or highly dependant software 1:36meaning that there are shared libraries 1:38within this architecture if you make a 1:41change you have to understand what other 1:44components rely on those those libraries 1:47so they're easy to break over time 1:49another challenge we have around model 1:51ifs are that their language and 1:54framework dependent so when the in this 1:57case if this is a java application any 1:59additional component that has to be 2:01written needs to be written in java so 2:03you're somewhat limited by decisions 2:05made in the past another thing that 2:07happens and another challenge with 2:09monoliths is growth over time user input 2:13comes back into the product team and 2:15they need to add additional 2:16functionality so initially it's small 2:18but over time you might need to add 2:21capability hey or capability B for 2:25example or capability C now as a whole 2:30the application is getting much larger 2:32it's harder for a team to actually 2:34understand what's happening to it and 2:35hard for a team to know every little 2:37intricacy about the thing as it grows as 2:39it also becomes bigger 2:41it takes heroic efforts to deploy the 2:43monolith meaning that on a Friday night 2:45you would have to shut down the original 2:47application and then actually deploy the 2:51new production application and the team 2:53the ops team would spend all weekend 2:54trying to stabilize it and get it to run 2:56so at Monday it can be up and functional 2:58again and that can be very painful for 3:00teams and it can be really hard another 3:03challenge we have around monoliths is 3:05the way they scale if it's really busy 3:07and there's lots of people trying to buy 3:09tickets in this example maybe the 3:11payment part of the application is under 3:14duress and it needs some additional 3:15capabilities what happened is you would 3:18have to redeploy the whole application 3:20to help satisfy that that demand and 3:22that need so in this instance we would 3:24maybe need to go ahead and redeploy 3:26another version of this system what that 3:30looks like is right now is we have one 3:32system running when this is under a 3:34contention we need to redeploy another 3:37version of that application there's 3:39number two the challenge is it might 3:41take a lot of time to go add that new 3:44application the new instance of the 3:47application and by the time it's up and 3:49running that peak may have already 3:51subsided and effectively you've done 3:52nothing to help your users so that's a 3:54challenge around the monolith as well 3:56let's look at the same example of the 3:58ticketing company in the micro services 4:00based environment so again a micro 4:02service environment we'd have the same 4:04functionality you'd have your user 4:06interface it would be in its own 4:08container as a service you'd have your 4:11inventory service as well 4:13your recommendation engine would be in 4:16its own service your your cart is in its 4:19service we had the payment service and 4:23we had reporting so it's the same as the 4:25the monolith that 4:27differences these all talk over api's 4:30and right off the bat you can see 4:33something that's kind of interesting 4:34because they're independent the team 4:36responsible for the reporting engine for 4:38example can choose a language and 4:40framework that they want to use 4:42themselves they are not beholden to 4:44choices made by the team that run the 4:45cart toward the UI or the payment system 4:48so that's really good it gives those 4:49teams flexibility so that's the language 4:52part another benefit is the ability to 4:54iterate because these are independent 4:56components and they just talk over api's 4:58the team responsible for the reporting 5:01engine for example can commit code that 5:04goes through the DevOps pipeline and one 5:06site gets tested and it's proven to work 5:09it can automatically be deployed to the 5:12to the environment so thereby these 5:14teams can iterate as fast as they need 5:17to bringing value to your to the 5:18customers so that's fantastic 5:20additionally these changes are minimal 5:22at best 5:22if there is an instance where a service 5:25does fail the rest of the application is 5:28still functional so that's less risk we 5:31also can scale these independently 5:33meaning that in the case where there's a 5:35user or a number of users that drive 5:37load and that payment service needs some 5:39additional help what needs to happen is 5:42the system can actually add capability 5:46automatically just for that particular 5:48service until the until that libs load 5:53subsides so eventually what happens is 5:56when the load goes back to its regular 5:58regular cadence for example those 6:01systems and those additional services 6:03can scale back to normal so again just 6:06to reiterate the micro services 6:08architecture is where every application 6:10function is its own service deployed 6:13inside of a container environment they 6:15communicate via api's their language and 6:18framework independent we iterate at will 6:21through a devops pipeline this reduces 6:24some of the risk that we we see and then 6:26we can scale these components 6:28independently so thank you for your time 6:31today if you like to learn more and see 6:33more light boarding videos check us out 6:35on the IBM cloud blog