Table of Contents
Microservices Introduction
Introduction to Microservices
Monolithic Architecture
Before microservices evolved, all the web-based applications were built with monolithic architectural style. In a monolithic architecture, an application is developed and deployed as a single deployable war(Web ARchive) file. All the user interface, business layer and database are packaged together into a single war file and deployed to an application server. Please refer below diagram.
Drawbacks of Monolithic Architecture
1. Whole Application Fails if single functionality fails
If any single application function or component fails, then the entire application goes down. Imagine a web application with separate functions including payment, login, and history. If a particular function starts consuming more processing power, the entire application’s performance will be compromised.
2. Scaling
Scaling monolithic applications such as the one described in the example can only be accomplished by deploying the same EAR/WAR packages in additional servers, known as horizontal scaling. Each copy of the application in additIonal servers will utilise the same amount of underlying resources, which is inefficient in its design.
3. Deployment
Every time an individual team needed to make a change, the entire application had to be rebuilt, retested and redeployed.
Microservices
a microservice is a small, loosely coupled, distributed service. Microservices allow you to take a large application and decompose it into easy-to–manage components with narrowly defined responsibilities. Microservices help combat the traditional problems of complexity in a large code base by decomposing the large code base down into small, well-defined pieces.
A microservice architecture has the following characteristics:
Source Code
Download source code of microservice with spring cloud from below git repository :
Lets go to our next tutorial where we will discuss
Part 2 – Scenario To Develop
In this tutorial we will understand below topics
– Scenario to develop in microservice architecture
– Create rest end points
PART 2 – MICROSERVICES WITH SPRING CLOUD : SCENARIO TO DEVELOP