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)