DEV Community

DigitalDump
DigitalDump

Posted on

Monoliths vs Microservices

MONOLITHS

Monolithic application architecture consists of one system, where business logic, codebase and all other parts are interconnected and dependent on each other.
image

MICROSERVICES

Microservices application architecture consists of individual services that function independently. Each service is responsible for a specific business goal, have their own logic and database, while working together as a distributed system with API-driven inter-process communication.
image

Advantages of Monolithic Architecture

Easy to develop and monitor

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.

High performance

Unlike microservice applications, monoliths don't require API for communication between components, enabling higher performance.

Advantages of Microservices Architecture

Increased Scalability

Since microservices are independent of one another, new components can easily be added with out downtime.

Autonomy

Microservices enable independent, cross-functional teams dedicated for each business goal, since the deployment/actions of one team won't affect other services. This increases the rate at which new updates and features can be deployed.

Disadvantages of Monolithic Architecture

Low Flexibility

Due to the high interdependence between services and elements, any change is likely to affect the entire network. Making updates, upkeep and additions time-consuming and the need to be carefully coordinated.

Difficulty in Scaling

Monolithic architecture prevents scaling individual components, instead you have to scale the entire app.

Disadvantages of Microservices Architecture

High resource requirement

The initial deployment and development of a microservices architecture requires a high number of resources and can take time. Since there needs to be seamless integration of the varying individual components.

Difficulty in testing

Due to the complexity of this architecture, testing can prove to be difficult, especially in terms of the interactions between services.

Docker Deployment Videos

Part 1

image

Part 2

image

Top comments (2)

Collapse
 
zilti_500 profile image
Daniel Ziltener

I'd say microservices are even easier to develop, too. You end up having less code in the project, and an easier time to see the interdependencies of your project's functions as well as the interdependencies between the services. And IPC is quite straightforward too - and in this case even forces you to make a habit out of cleanly separating concerns.

Collapse
 
arvindpdmn profile image
Arvind Padmanabhan

Might be useful to point out stateful vs stateless microservices. See devopedia.org/microservices