32
So Monolith or Microservice?
MONOLITHIC ARCHITECTURE
A monolithic architecture refers to the fact that your entire application is one large project or codebase. Let’s say you were building an online store. This single codebase must be responsible for every concern of the application from login, to account management, to the product listings, to the shopping cart, payment processing etc.
It sounds immediately critical but there's advantage of monolithic architecture as well.
1. Monoliths are also generally easier to test, as all of their components are in one place for end-to-end access.
2. They are also easy to deploy and scale horizontally as a single package that you can place on multiple server instances.
3. Initial development of monolithic architecture is fast because it is built with the mindset that all parts should be interconnected and dependent on each other.
4. Monoliths don't require API for communication between components, enabling higher performance.
1. Monoliths are also generally easier to test, as all of their components are in one place for end-to-end access.
2. They are also easy to deploy and scale horizontally as a single package that you can place on multiple server instances.
3. Initial development of monolithic architecture is fast because it is built with the mindset that all parts should be interconnected and dependent on each other.
4. Monoliths don't require API for communication between components, enabling higher performance.
There are also several drawbacks of it:
1. When you get to an enterprise-level application, a single codebase becomes large and hard to handle.
2. Every change in any feature requires a redeployment of the entire application.
3. Making updates, making additions is time-consuming and need to be carefully coordinated.
4. It is extremely problematic to apply new technology in a monolithic application because then the entire application has to be rewritten.
1. When you get to an enterprise-level application, a single codebase becomes large and hard to handle.
2. Every change in any feature requires a redeployment of the entire application.
3. Making updates, making additions is time-consuming and need to be carefully coordinated.
4. It is extremely problematic to apply new technology in a monolithic application because then the entire application has to be rewritten.
MICROSERVICE ARCHITECTURE
A microservice architecture aims to break down a large application into several more manageable chunks. Using the example of an online store above, you could have a microservice, or even a micro application, dedicated to login. Another dedicated to your product catalogue. Yet a third to handle payments and/or shipping. Essentially, each concern of the application is broken into a separate project or service.
But there's a double-edged sword, just like the monolith.
There are many advantages to a microservice approach as well though.
There are many advantages to a microservice approach as well though.
The major disadvantage of Microservice is
So Monolith or Microservice?
Choosing a monolithic architecture: Small teams, simple application, fast deployment, No microservice expertise, quick release.
Choosing a monolithic architecture: Small teams, simple application, fast deployment, No microservice expertise, quick release.
Choosing a microservice architecture: Complex and scalable application, long term plans, larger data scale, have a team with different language expertise.
32