Microservices vs a Monolithic Approach
Designing & Building Microservices
The course is part of this learning path
Interested in microservices, and how they can be used for increased agility and scalability?
Microservices is an architectural style and pattern that structures an application as a collection of coherent services. Each service is highly maintainable, testable, loosely coupled, independently deployable, and precisely focused.
This course takes a hands-on look at microservices using Python, Flask, and Docker. You'll learn how Flask can be used to quickly prototype and build microservices, as well as how to use Docker to host and deploy them.
We start by looking at various problems associated with monolithic architectures and how microservices address them. We then move on to designing and building a basic shopping cart system, focusing on each of the microservices that make up the overall system.
If you have any feedback relating to this course, feel free to get in touch with us at email@example.com.
- Obtain a solid understanding of microservices: the benefits, the challenges, and how using microservices differs from a monolithic approach
- Learn how to design and build microservices using Python and Flask
- Learn how to deploy microservices using Docker
This course is intended for anyone who wants to build and deploy microservices using Python, Flask, and Docker.
Python 3.x programming experience is required to get the most out of this course. If you want to follow along with this course, you'll need Python 3.7, an IDE (PyCharm Community Edition - free), and Docker (Docker Desktop).
The complete source code for the project demonstrated within the course is located here:
The repository contains the following 4 projects:
A monolithic application has a single code base with several multiple application packages and modules. Each module has separate business logic. This type of application has a single build for the entire application and delivered as a single deploy-able.
A huge monolithic code causes complications for developers in understanding code. Scaling of the application becomes challenging as with more copies of monolithic applications there is an increment in memory consumption, bandwidth consumption I/O traffic, and disk volume consumption.
Different application components have different resource requirements. One might be CPU intensive while the other is memory intensive. And due to the monolithic nature, we can’t scale each component individually. Loading large monolithic application code into an IDE leads to frustration as a large monolithic code-base often requires undesirable longer compile time. Also, it adds up to frustration making a single line of code change and waiting for code to recompile. It becomes more difficult to change the underlying technology, the language, and the framework because everything is tightly coupled and depends upon each other.
Dependency Management is also a problem as any change in one module requires the entire application to be recompiled and redeployed. All components in our application talk to one database only. After some time, the database becomes huge and we have to scale the database.
Now one application module might require a different database system with different capacity from other modules. But in monolithic architecture, we are limited to one single database. If a specific feature is not working in a single module, it could take the entire system down.
To handle the issue, the system has to be patched and rebuilt, retested, and redeployed. Take a quick pause here and when we come back, we learn about the characteristics of microservices.
Saqib is a member of the content creation team at Cloud Academy. He has over 15 years of experience in IT as a Programmer, with experience in Linux and AWS admin. He's also had DevOps engineer experience in various startups and in the telecommunications sector. He loves developing Unity3D games and participating in Game Jams.