Microservice Architecture is a special design pattern where small services work together in service-oriented architecture. It focuses on decomposing an application into separate functional modules and interfaces. Each module can function independently and will get deployed on its own service.
In this method, the large application is divided into smaller independent units. By combining all the microservices together, it constructs a big service. The most important feature of the microservice-based architecture is that it performs continuous delivery of a large and complex applications.
If one microservice is changed, other services are not affected. These services will communicate with each other by using lightweight protocols such as HTTP or REST or messaging protocols.
In Monolithic Architecture, all the components coalesce into a single module. Monolithic architecture is like a big container in which all the software components of an application are put together into a single package.
Microservice architecture contains fine-grained services and lightweight protocols.
DIFFRENCE BETWEEN MONOLITHIC AND MICROSERVICES:
FEATURES OF MICROSERVICES:
ADVANTAGES OF MICROSERVICE ARCHITECTURE:
5.Mixed Technology Stack
6.Bug fixes and feature releases are more manageable and less risky.
COMPANIES USING MICROSERVICES:
1.Use Single responsibility principle .
2.Use asynchronous communication to achieve loose coupling .
3.To have a separate data store(s) for your microservice .
4.Separate build for each Micro service.
5. Proxy your microservice requests through an API Gateway .
6.Always treat- sever as stateless.
EXAMPLE FOR MICROSERVICES FRAMEWORKFOR JAVA:
DISADVANTAGES OF MICROSERVICES:
1.Difficultly in managing large number of services.
2.Complex testing over distributed environment and chances of failure during communication between services.
3.Network latency and load balancing are the two problems to be solved by the developers.
4.Effective management and teamwork required to prevent cascading issues.
5.Microservice is costly, because you need to maintain different server space for different business tasks.