In this article, we will have a complete overview of the term Microservices, its pros and cons and why it is preferred.
In layman’s language, Microservices architecture can be defined as a model in which a Project is divided into small Modules. In this architecture, an application is decomposed into tiny micro packages so that it becomes easy for the Developers to create the application.
The whole idea to use this type of approach is only because it becomes very easy to manage small components of the application rather than managing the whole monolithic Application (usually contains 10000 lines of code).
Each service made in this architecture is made flexible, robust and complete. These services run autonomously and communicate with each other using API. One important thing to mention here is that we can use different programming languages in one Project as each microservice is independent from each other and can be implemented in any different platform.
Many Multinational companies are already using this architecture for their deployments. Here is the list of the few companies who are already using this type of approach –
- Sound Cloud
- Comcast Cable
However, there are many more companies using this Architecture.
Benefits of using Microservices
- Technology Adaption – If we are using Microservice Architecture then it becomes very easy to adapt new technology or a new process. We can try new programming languages for newer modules as all tiny modules will be independent from each other.
- Prevention for System Failure – It also prevents from System Failure as if one single module fails to execute then it will not affect the entire application.
- DURS – Each module can be independently DURS (deployed, updated, replaced and scaled).
- Scalability – As microservices are deployed independently of each other,they can be monitored and scaled independently.
Along with the Benefits, this architecture also have its own disadvantages.
Disadvantages of Microservices architecture
- Debugging – Sometimes if a system fails, then it becomes very difficult to check all the microservices and ensure that the main fault is in this particular service. To keep this simple, centralized logging of data is additionally required.
- Configuration and Management – As there are multiple services for a single Project so it becomes very difficult to firstly configure them and then to manage them.
Microservices provides a unique kind of modularity which has many advantages i.e increases flexibility, productivity and scalability. However as like many other approaches, microservices also has disadvantages.
Sometimes using different programming languages, libraries and frameworks can also led to huge Security Vulnerabilities. As in Single project, we can update all the libraries and framework but in Microservices architecture, we need to have a complete look at all the libraries used.