What is Monolithic architecture ?
In layman term “you have to arrange bricks in a container ”
Do you find it easy? definitely “yes” if and only if number of bricks are less and complexity increases with quantity of bricks.
Let me come to technical term
A monolithic application is a traditional way of building a software and is built on a single codebase with a varying modules. The number of modules depends on the complexity of the business and its technical features. Application consists of one system, where parts such as the codebase, business logic, and other parts are all interconnected and dependent on one another. Application forms one executable to deploy.
What are Monolithic advantage ?
- Easy to build and monitor .
- Easier debugging and testing because it involves one modules or executable.
- Better performance — As shared-memory access is faster than inter process communication
What are Monolithic disadvantage ?
- difficult to scale application.
- Adding functionality becomes tough because it involves a lot of understanding of existing application and makes process slower.
- Upgrading to new technology very complex because entire application has to upgraded to newer technology
What is Microservice architecture ?
In Layman term “you have to arrange bricks in a different container” How do you arrange it ? definitely left to you. We can arrange it based on color, size, weight etc.
Microservice breaks application into smaller independent units , each independent units has it own codebase, business logic and database layer .Each application forms different executable to deploy.
What are microservice advantages ?
- Easy to scale : Each element can be scaled independently.
- Easy to modify in codebase because each one of them are independent and different modules
- Flexibility to upgrade technology : Each modules are independent and can be upgraded to any technology much easier compared to monolithic.
- The higher level of agility. Any fault in a microservices application affects only a particular service and not the whole solution. So all the changes and experiments are implemented with lower risks and fewer errors.
What are microservice disadvantages ?
- Easier for testing and debugging since it involves interdependent communication.
- Skilled developers are required to work with microservices architecture which can identify the microservices and manage their inter-communications.
- Independent deployment of each services is complicated.
- Microservices are less secure relative to monolithic applications due to the inter-services communication over the network.