DEV Community

Shubham Yadav
Shubham Yadav

Posted on

microservice and monolithic architectures.

Before microservices, let's see what a monolithic architecture is.

A monolithic architecture is like a huge container within which all software components of an application are assembled, and all the components share a same database.

Image description

๐Ÿ‘ advantages of monolithic architecture:

  • easy deployment.
  • easier to develop.
  • end to end testing can be performed faster.
  • easy debugging.

๐Ÿ‘Ž Disadvantages of monolithic architecture:

  • Scalability: Individual components cannot be scaled.
  • Reliability: if one feature goes down, the entire system goes down
  • Adoption of technology is restricted.
  • Lack of flexibility.

๐Ÿš€ Microservice architecture

A microservices architecture is an architectural solution that is based on a collection of independently deployable services. These services have their own business logic and database, and they serve a specialised purpose.

Image description

๐Ÿ‘ Advantages of Microservices

  • Flexible scaling
  • Continuous deployment: frequent and faster release cycles.
  • Highly maintainable and testable.
  • Independently deployable.
  • High reliability: one failure does not bring down the entire application.

๐Ÿ‘Ž Disadvantages of Microservices

  • Difficult to manage a large number of services.
  • Each microservice has its own set of logs, making debugging more difficult.

Components of Microservices Architecture:

Image description

๐Ÿ”ต Identity Provider: These client requests are subsequently forwarded to identity providers, who authenticate the requests and relay them to API Gateway. The queries are subsequently routed to internal services using a well-defined API Gateway.

๐Ÿ”ต Static Content. Following internal communication, the Microservices distribute static material to a cloud-based storage service that may provide it directly to clients via Content Delivery Networks (CDNs).

๐Ÿ”ต Management: This component is responsible for balancing the services on nodes and identifying failures.

๐Ÿ”ต Service Discovery: it keeps a list of services on which nodes are situated, it acts as a guide for Microservices to discover the path of communication between them.

Follow me on twitter

Top comments (0)