Microservices are groups of small services that work together and all services are loosely coupled and well-defined tasks.
This tutorial will teach us how to build microservices using Java language using Spring framework projects(Spring Boot and Spring Cloud).
Before Microservices
Before microservices, most applications are built in Monolithic architectural formats. In monolithic architecture, an Application has a single deployable software artefact. Suppose, we have an e-commerce application, in which we can see a lot of modules or services like login, cart, product categories and many more. So, in a monolithic architectural style, all services are developed in one application. Day by day based on the requirement monolithic applications will become large and complex as the new services will be added according to the requirement and demand.
Disadvantage of the Monolithic Application:-
- Due to the large size complexity is more for development and testing.
- Longer deployment time and if small changes are needed then redeployment is needed and the application will be down in deployment time due to single artifacts.
- Can't scale individual components.
- Reliability issue. If any error in any of the modules whole application will be affected.
- Technology adoption issue. If any changes or challenges in the framework or language the entire application will be affected because changes in not be easy in monolithic architectural applications.